formatted the whole codebase

This commit is contained in:
asif
2025-08-18 03:20:05 +05:30
parent e2a809d363
commit e6ea764785
58 changed files with 470 additions and 373 deletions

View File

@@ -170,14 +170,16 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
);
try {
final isSuccess = await service.sendForValidation(beneficiaryWithTpin);
final isSuccess =
await service.sendForValidation(beneficiaryWithTpin);
if (pinScreenContext.mounted) {
Navigator.pop(pinScreenContext); // Close the spinner
Navigator.pushReplacement(
pinScreenContext,
MaterialPageRoute(
builder: (ctx) => BeneficiaryResultPage(isSuccess: isSuccess),
builder: (ctx) =>
BeneficiaryResultPage(isSuccess: isSuccess),
),
);
}
@@ -196,7 +198,8 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
Navigator.pop(pinScreenContext); // Close the spinner
ScaffoldMessenger.of(pinScreenContext).showSnackBar(
SnackBar(
content: Text(AppLocalizations.of(context).somethingWentWrong)),
content: Text(
AppLocalizations.of(context).somethingWentWrong)),
);
}
}
@@ -455,7 +458,8 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
child: CircularProgressIndicator(
strokeWidth: 2),
)
: Text(AppLocalizations.of(context).validateBeneficiary),
: Text(AppLocalizations.of(context)
.validateBeneficiary),
),
),
),

View File

@@ -66,34 +66,35 @@ class _BeneficiaryResultPageState extends State<BeneficiaryResultPage> {
),
],
),
Positioned(
bottom: 20, // keep it slightly above the very bottom
left: 16,
right: 16,
child: SizedBox(
height: 56, // larger button height
child: ElevatedButton(
onPressed: () {
Navigator.pushReplacement( // ensures back goes to ScaffoldScreen
context,
MaterialPageRoute(
builder: (context) => const NavigationScaffold(),
Positioned(
bottom: 20, // keep it slightly above the very bottom
left: 16,
right: 16,
child: SizedBox(
height: 56, // larger button height
child: ElevatedButton(
onPressed: () {
Navigator.pushReplacement(
// ensures back goes to ScaffoldScreen
context,
MaterialPageRoute(
builder: (context) => const NavigationScaffold(),
),
);
},
style: ElevatedButton.styleFrom(
shape: const StadiumBorder(),
padding: const EdgeInsets.symmetric(vertical: 12),
backgroundColor: Theme.of(context).primaryColorDark,
foregroundColor: Theme.of(context).scaffoldBackgroundColor,
),
child: Text(
AppLocalizations.of(context).done,
style: const TextStyle(fontSize: 18), // slightly bigger text
),
),
),
),
);
},
style: ElevatedButton.styleFrom(
shape: const StadiumBorder(),
padding: const EdgeInsets.symmetric(vertical: 12),
backgroundColor: Theme.of(context).primaryColorDark,
foregroundColor: Theme.of(context).scaffoldBackgroundColor,
),
child: Text(
AppLocalizations.of(context).done,
style: const TextStyle(fontSize: 18), // slightly bigger text
),
),
),
),
if (widget.isSuccess)
Align(
alignment: Alignment.topCenter,
@@ -112,4 +113,4 @@ Positioned(
),
);
}
}
}

View File

@@ -67,29 +67,30 @@ class _ManageBeneficiariesScreen extends State<ManageBeneficiariesScreen> {
width: 40,
height: 40,
);
}
}
if (bankName != null && bankName.toLowerCase().contains('kangra central')) {
return Image.asset(
'assets/images/icon.png',
width: 40,
height: 40,
);
}
}
if (bankName != null && bankName.toLowerCase().contains('hdfc bank ltd')) {
return Image.asset(
'assets/images/hdfc_logo.png',
width: 40,
height: 40,
);
}
if (bankName != null && bankName.toLowerCase().contains('icici bank ltd')) {
}
if (bankName != null && bankName.toLowerCase().contains('icici bank ltd')) {
return Image.asset(
'assets/images/icici_logo.png',
width: 40,
height: 40,
);
}
if (bankName != null && bankName.toLowerCase().contains('punjab national bank')) {
}
if (bankName != null &&
bankName.toLowerCase().contains('punjab national bank')) {
return Image.asset(
'assets/images/pnb_logo.png',
width: 40,