diff --git a/lib/features/fund_transfer/screens/fund_transfer_amount_screen.dart b/lib/features/fund_transfer/screens/fund_transfer_amount_screen.dart index e67be36..4e45f1c 100644 --- a/lib/features/fund_transfer/screens/fund_transfer_amount_screen.dart +++ b/lib/features/fund_transfer/screens/fund_transfer_amount_screen.dart @@ -296,140 +296,142 @@ class _FundTransferAmountScreenState extends State { final loc = AppLocalizations.of(context); return Scaffold( appBar: AppBar( - title: Text(loc.fundTransfer), + title: Text(loc.fundTransfer.replaceFirst(RegExp('\n'), '')), ), - body: Padding( - padding: const EdgeInsets.all(16.0), - child: Form( - key: _formKey, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - // Debit Account (User) - Text( - loc.debitFrom, - style: Theme.of(context).textTheme.titleSmall, - ), - Card( - elevation: 0, - margin: const EdgeInsets.symmetric(vertical: 8.0), - child: ListTile( - leading: Image.asset( - 'assets/images/logo.png', - width: 40, - height: 40, - ), - title: Text(widget.remitterName), - subtitle: Text(widget.debitAccountNo), - ), - ), - const SizedBox(height: 24), - - // Credit Account (Beneficiary) - Text( - AppLocalizations.of(context).creditedTo, - style: Theme.of(context).textTheme.titleSmall, - ), - Card( - elevation: 0, - margin: const EdgeInsets.symmetric(vertical: 8.0), - child: ListTile( - leading: - getBankLogo(widget.creditBeneficiary.bankName, context), - title: Text(widget.creditBeneficiary.name), - subtitle: Text(widget.creditBeneficiary.accountNo), - ), - ), - const SizedBox(height: 24), - - if (!widget.isOwnBank) ...[ - // Transaction Mode Selection + body: SafeArea( + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Form( + key: _formKey, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // Debit Account (User) Text( - AppLocalizations.of(context).selectTransactionType, - style: Theme.of(context).textTheme.titleMedium, + loc.debitFrom, + style: Theme.of(context).textTheme.titleSmall, ), - const SizedBox(height: 12), - Container( - decoration: BoxDecoration( - color: Theme.of(context).cardColor, - borderRadius: BorderRadius.circular(12), - border: Border.all(color: Colors.grey.shade300), - ), - child: ToggleButtons( - isSelected: [ - _selectedMode == TransactionMode.neft, - _selectedMode == TransactionMode.rtgs, - _selectedMode == TransactionMode.imps, - ], - onPressed: (index) { - setState(() { - _selectedMode = TransactionMode.values[index]; - }); - }, - borderRadius: BorderRadius.circular(10), - selectedColor: Theme.of(context).colorScheme.onPrimary, - fillColor: Theme.of(context).colorScheme.primary, - color: Theme.of(context).colorScheme.onSurface, - borderColor: Colors.transparent, - selectedBorderColor: Colors.transparent, - splashColor: Theme.of(context).colorScheme.primary, - highlightColor: Theme.of(context).colorScheme.primary, - children: [ - Padding( - padding: const EdgeInsets.symmetric( - horizontal: 24.0, vertical: 12.0), - child: Text(AppLocalizations.of(context).neft), - ), - Padding( - padding: const EdgeInsets.symmetric( - horizontal: 24.0, vertical: 12.0), - child: Text(AppLocalizations.of(context).rtgs), - ), - Padding( - padding: const EdgeInsets.symmetric( - horizontal: 24.0, vertical: 12.0), - child: Text(AppLocalizations.of(context).imps), - ), - ], + Card( + elevation: 0, + margin: const EdgeInsets.symmetric(vertical: 8.0), + child: ListTile( + leading: Image.asset( + 'assets/images/logo.png', + width: 40, + height: 40, + ), + title: Text(widget.remitterName), + subtitle: Text(widget.debitAccountNo), ), ), const SizedBox(height: 24), - ], - // Amount - TextFormField( - controller: _amountController, - keyboardType: TextInputType.number, - decoration: InputDecoration( - labelText: loc.amount, - border: const OutlineInputBorder(), - prefixIcon: const Icon(Icons.currency_rupee), - ), - validator: (value) { - if (value == null || value.isEmpty) { - return loc.amountRequired; - } - if (double.tryParse(value) == null || - double.parse(value) <= 0) { - return loc.validAmount; - } - return null; - }, - ), - const Spacer(), - // Proceed Button - SizedBox( - width: double.infinity, - child: ElevatedButton( - onPressed: _onProceed, - style: ElevatedButton.styleFrom( - padding: const EdgeInsets.symmetric(vertical: 16), - ), - child: Text(AppLocalizations.of(context).proceed), + // Credit Account (Beneficiary) + Text( + AppLocalizations.of(context).creditedTo, + style: Theme.of(context).textTheme.titleSmall, ), - ), - const SizedBox(height: 10), - ], + Card( + elevation: 0, + margin: const EdgeInsets.symmetric(vertical: 8.0), + child: ListTile( + leading: + getBankLogo(widget.creditBeneficiary.bankName, context), + title: Text(widget.creditBeneficiary.name), + subtitle: Text(widget.creditBeneficiary.accountNo), + ), + ), + const SizedBox(height: 24), + + if (!widget.isOwnBank) ...[ + // Transaction Mode Selection + Text( + AppLocalizations.of(context).selectTransactionType, + style: Theme.of(context).textTheme.titleMedium, + ), + const SizedBox(height: 12), + Container( + decoration: BoxDecoration( + color: Theme.of(context).cardColor, + borderRadius: BorderRadius.circular(12), + border: Border.all(color: Colors.grey.shade300), + ), + child: ToggleButtons( + isSelected: [ + _selectedMode == TransactionMode.neft, + _selectedMode == TransactionMode.rtgs, + _selectedMode == TransactionMode.imps, + ], + onPressed: (index) { + setState(() { + _selectedMode = TransactionMode.values[index]; + }); + }, + borderRadius: BorderRadius.circular(10), + selectedColor: Theme.of(context).colorScheme.onPrimary, + fillColor: Theme.of(context).colorScheme.primary, + color: Theme.of(context).colorScheme.onSurface, + borderColor: Colors.transparent, + selectedBorderColor: Colors.transparent, + splashColor: Theme.of(context).colorScheme.primary, + highlightColor: Theme.of(context).colorScheme.primary, + children: [ + Padding( + padding: const EdgeInsets.symmetric( + horizontal: 24.0, vertical: 12.0), + child: Text(AppLocalizations.of(context).neft), + ), + Padding( + padding: const EdgeInsets.symmetric( + horizontal: 24.0, vertical: 12.0), + child: Text(AppLocalizations.of(context).rtgs), + ), + Padding( + padding: const EdgeInsets.symmetric( + horizontal: 24.0, vertical: 12.0), + child: Text(AppLocalizations.of(context).imps), + ), + ], + ), + ), + const SizedBox(height: 24), + ], + // Amount + TextFormField( + controller: _amountController, + keyboardType: TextInputType.number, + decoration: InputDecoration( + labelText: loc.amount, + border: const OutlineInputBorder(), + prefixIcon: const Icon(Icons.currency_rupee), + ), + validator: (value) { + if (value == null || value.isEmpty) { + return loc.amountRequired; + } + if (double.tryParse(value) == null || + double.parse(value) <= 0) { + return loc.validAmount; + } + return null; + }, + ), + const Spacer(), + + // Proceed Button + SizedBox( + width: double.infinity, + child: ElevatedButton( + onPressed: _onProceed, + style: ElevatedButton.styleFrom( + padding: const EdgeInsets.symmetric(vertical: 16), + ), + child: Text(AppLocalizations.of(context).proceed), + ), + ), + const SizedBox(height: 10), + ], + ), ), ), ), diff --git a/lib/features/fund_transfer/screens/fund_transfer_screen.dart b/lib/features/fund_transfer/screens/fund_transfer_screen.dart index 05a9ecf..cfb66d0 100644 --- a/lib/features/fund_transfer/screens/fund_transfer_screen.dart +++ b/lib/features/fund_transfer/screens/fund_transfer_screen.dart @@ -17,7 +17,9 @@ class FundTransferScreen extends StatelessWidget { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: Text(AppLocalizations.of(context).fundTransfer), + title: Text(AppLocalizations.of(context) + .fundTransfer + .replaceFirst(RegExp('\n'), '')), ), body: ListView( children: [ diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index 5f66390..358dc80 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -109,9 +109,8 @@ "gmNorth": "General Manager (North)", "enquiry": "Enquiry", "fundTransferBeneficiary": "Fund Transfer - Beneficiary", -"fundTransfer": "Fund Transfer", "enterAmount": "Enter Amount", -"accountInfo": "Account Info", +"accountInfo": "Account \n Info", "customerNumber": "Customer Number", "productName": "Product Name", "accountStatus": "Account Status",