added safearea to some screens. Also fixed some titlebars from wrap text
This commit is contained in:
@@ -296,140 +296,142 @@ class _FundTransferAmountScreenState extends State<FundTransferAmountScreen> {
|
|||||||
final loc = AppLocalizations.of(context);
|
final loc = AppLocalizations.of(context);
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: Text(loc.fundTransfer),
|
title: Text(loc.fundTransfer.replaceFirst(RegExp('\n'), '')),
|
||||||
),
|
),
|
||||||
body: Padding(
|
body: SafeArea(
|
||||||
padding: const EdgeInsets.all(16.0),
|
child: Padding(
|
||||||
child: Form(
|
padding: const EdgeInsets.all(16.0),
|
||||||
key: _formKey,
|
child: Form(
|
||||||
child: Column(
|
key: _formKey,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
child: Column(
|
||||||
children: [
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
// Debit Account (User)
|
children: [
|
||||||
Text(
|
// Debit Account (User)
|
||||||
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
|
|
||||||
Text(
|
Text(
|
||||||
AppLocalizations.of(context).selectTransactionType,
|
loc.debitFrom,
|
||||||
style: Theme.of(context).textTheme.titleMedium,
|
style: Theme.of(context).textTheme.titleSmall,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 12),
|
Card(
|
||||||
Container(
|
elevation: 0,
|
||||||
decoration: BoxDecoration(
|
margin: const EdgeInsets.symmetric(vertical: 8.0),
|
||||||
color: Theme.of(context).cardColor,
|
child: ListTile(
|
||||||
borderRadius: BorderRadius.circular(12),
|
leading: Image.asset(
|
||||||
border: Border.all(color: Colors.grey.shade300),
|
'assets/images/logo.png',
|
||||||
),
|
width: 40,
|
||||||
child: ToggleButtons(
|
height: 40,
|
||||||
isSelected: [
|
),
|
||||||
_selectedMode == TransactionMode.neft,
|
title: Text(widget.remitterName),
|
||||||
_selectedMode == TransactionMode.rtgs,
|
subtitle: Text(widget.debitAccountNo),
|
||||||
_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),
|
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
|
// Credit Account (Beneficiary)
|
||||||
SizedBox(
|
Text(
|
||||||
width: double.infinity,
|
AppLocalizations.of(context).creditedTo,
|
||||||
child: ElevatedButton(
|
style: Theme.of(context).textTheme.titleSmall,
|
||||||
onPressed: _onProceed,
|
|
||||||
style: ElevatedButton.styleFrom(
|
|
||||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
|
||||||
),
|
|
||||||
child: Text(AppLocalizations.of(context).proceed),
|
|
||||||
),
|
),
|
||||||
),
|
Card(
|
||||||
const SizedBox(height: 10),
|
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),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@@ -17,7 +17,9 @@ class FundTransferScreen extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: Text(AppLocalizations.of(context).fundTransfer),
|
title: Text(AppLocalizations.of(context)
|
||||||
|
.fundTransfer
|
||||||
|
.replaceFirst(RegExp('\n'), '')),
|
||||||
),
|
),
|
||||||
body: ListView(
|
body: ListView(
|
||||||
children: [
|
children: [
|
||||||
|
@@ -109,9 +109,8 @@
|
|||||||
"gmNorth": "General Manager (North)",
|
"gmNorth": "General Manager (North)",
|
||||||
"enquiry": "Enquiry",
|
"enquiry": "Enquiry",
|
||||||
"fundTransferBeneficiary": "Fund Transfer - Beneficiary",
|
"fundTransferBeneficiary": "Fund Transfer - Beneficiary",
|
||||||
"fundTransfer": "Fund Transfer",
|
|
||||||
"enterAmount": "Enter Amount",
|
"enterAmount": "Enter Amount",
|
||||||
"accountInfo": "Account Info",
|
"accountInfo": "Account \n Info",
|
||||||
"customerNumber": "Customer Number",
|
"customerNumber": "Customer Number",
|
||||||
"productName": "Product Name",
|
"productName": "Product Name",
|
||||||
"accountStatus": "Account Status",
|
"accountStatus": "Account Status",
|
||||||
|
Reference in New Issue
Block a user