added SafeArea and changed buttton color in Add Beneficiary Page
This commit is contained in:
@@ -220,8 +220,6 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
|
|||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: Text(
|
title: Text(
|
||||||
AppLocalizations.of(context).addBeneficiary,
|
AppLocalizations.of(context).addBeneficiary,
|
||||||
style:
|
|
||||||
const TextStyle(color: Colors.black, fontWeight: FontWeight.w500),
|
|
||||||
),
|
),
|
||||||
centerTitle: false,
|
centerTitle: false,
|
||||||
),
|
),
|
||||||
@@ -246,18 +244,6 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
|
|||||||
// prefixIcon: Icon(Icons.person),
|
// prefixIcon: Icon(Icons.person),
|
||||||
border: const OutlineInputBorder(),
|
border: const OutlineInputBorder(),
|
||||||
isDense: true,
|
isDense: true,
|
||||||
filled: true,
|
|
||||||
fillColor:
|
|
||||||
Theme.of(context).scaffoldBackgroundColor,
|
|
||||||
enabledBorder: const OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(color: Colors.black),
|
|
||||||
),
|
|
||||||
focusedBorder: const OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: Colors.black,
|
|
||||||
width: 2,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
obscureText: true,
|
obscureText: true,
|
||||||
keyboardType: TextInputType.number,
|
keyboardType: TextInputType.number,
|
||||||
@@ -288,18 +274,6 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
|
|||||||
// prefixIcon: Icon(Icons.person),
|
// prefixIcon: Icon(Icons.person),
|
||||||
border: const OutlineInputBorder(),
|
border: const OutlineInputBorder(),
|
||||||
isDense: true,
|
isDense: true,
|
||||||
filled: true,
|
|
||||||
fillColor:
|
|
||||||
Theme.of(context).scaffoldBackgroundColor,
|
|
||||||
enabledBorder: const OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(color: Colors.black),
|
|
||||||
),
|
|
||||||
focusedBorder: const OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: Colors.black,
|
|
||||||
width: 2,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
keyboardType: TextInputType.number,
|
keyboardType: TextInputType.number,
|
||||||
textInputAction: TextInputAction.next,
|
textInputAction: TextInputAction.next,
|
||||||
@@ -318,7 +292,6 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
const SizedBox(height: 24),
|
const SizedBox(height: 24),
|
||||||
// 🔹 IFSC Code Field
|
|
||||||
TextFormField(
|
TextFormField(
|
||||||
controller: ifscController,
|
controller: ifscController,
|
||||||
maxLength: 11,
|
maxLength: 11,
|
||||||
@@ -329,18 +302,6 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
|
|||||||
labelText: AppLocalizations.of(context).ifscCode,
|
labelText: AppLocalizations.of(context).ifscCode,
|
||||||
border: const OutlineInputBorder(),
|
border: const OutlineInputBorder(),
|
||||||
isDense: true,
|
isDense: true,
|
||||||
filled: true,
|
|
||||||
fillColor:
|
|
||||||
Theme.of(context).scaffoldBackgroundColor,
|
|
||||||
enabledBorder: const OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(color: Colors.black),
|
|
||||||
),
|
|
||||||
focusedBorder: const OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: Colors.black,
|
|
||||||
width: 2,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
textCapitalization: TextCapitalization.characters,
|
textCapitalization: TextCapitalization.characters,
|
||||||
textInputAction: TextInputAction.next,
|
textInputAction: TextInputAction.next,
|
||||||
@@ -378,18 +339,6 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
|
|||||||
labelText: AppLocalizations.of(context).bankName,
|
labelText: AppLocalizations.of(context).bankName,
|
||||||
border: const OutlineInputBorder(),
|
border: const OutlineInputBorder(),
|
||||||
isDense: true,
|
isDense: true,
|
||||||
filled: true,
|
|
||||||
fillColor: Theme.of(context)
|
|
||||||
.dialogBackgroundColor, // disabled color
|
|
||||||
enabledBorder: const OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(color: Colors.black),
|
|
||||||
),
|
|
||||||
focusedBorder: const OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: Colors.black,
|
|
||||||
width: 2,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 24),
|
const SizedBox(height: 24),
|
||||||
@@ -401,17 +350,6 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
|
|||||||
labelText: AppLocalizations.of(context).branchName,
|
labelText: AppLocalizations.of(context).branchName,
|
||||||
border: const OutlineInputBorder(),
|
border: const OutlineInputBorder(),
|
||||||
isDense: true,
|
isDense: true,
|
||||||
filled: true,
|
|
||||||
fillColor: Theme.of(context).dialogBackgroundColor,
|
|
||||||
enabledBorder: const OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(color: Colors.black),
|
|
||||||
),
|
|
||||||
focusedBorder: const OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: Colors.black,
|
|
||||||
width: 2,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 24),
|
const SizedBox(height: 24),
|
||||||
@@ -456,15 +394,6 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
|
|||||||
AppLocalizations.of(context).beneficiaryName,
|
AppLocalizations.of(context).beneficiaryName,
|
||||||
border: const OutlineInputBorder(),
|
border: const OutlineInputBorder(),
|
||||||
isDense: true,
|
isDense: true,
|
||||||
filled: true,
|
|
||||||
fillColor: Theme.of(context).dialogBackgroundColor,
|
|
||||||
enabledBorder: const OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(color: Colors.black),
|
|
||||||
),
|
|
||||||
focusedBorder: const OutlineInputBorder(
|
|
||||||
borderSide:
|
|
||||||
BorderSide(color: Colors.black, width: 2),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
textInputAction: TextInputAction.next,
|
textInputAction: TextInputAction.next,
|
||||||
validator: (value) => value == null || value.isEmpty
|
validator: (value) => value == null || value.isEmpty
|
||||||
@@ -479,18 +408,6 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
|
|||||||
labelText: AppLocalizations.of(context).accountType,
|
labelText: AppLocalizations.of(context).accountType,
|
||||||
border: const OutlineInputBorder(),
|
border: const OutlineInputBorder(),
|
||||||
isDense: true,
|
isDense: true,
|
||||||
filled: true,
|
|
||||||
fillColor:
|
|
||||||
Theme.of(context).scaffoldBackgroundColor,
|
|
||||||
enabledBorder: const OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(color: Colors.black),
|
|
||||||
),
|
|
||||||
focusedBorder: const OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: Colors.black,
|
|
||||||
width: 2,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
items: [
|
items: [
|
||||||
'Savings',
|
'Savings',
|
||||||
@@ -519,18 +436,6 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
|
|||||||
prefixIcon: const Icon(Icons.phone),
|
prefixIcon: const Icon(Icons.phone),
|
||||||
border: const OutlineInputBorder(),
|
border: const OutlineInputBorder(),
|
||||||
isDense: true,
|
isDense: true,
|
||||||
filled: true,
|
|
||||||
fillColor:
|
|
||||||
Theme.of(context).scaffoldBackgroundColor,
|
|
||||||
enabledBorder: const OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(color: Colors.black),
|
|
||||||
),
|
|
||||||
focusedBorder: const OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: Colors.black,
|
|
||||||
width: 2,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
textInputAction: TextInputAction.done,
|
textInputAction: TextInputAction.done,
|
||||||
validator: (value) =>
|
validator: (value) =>
|
||||||
@@ -545,16 +450,22 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.all(16.0),
|
padding: const EdgeInsets.symmetric(vertical: 10),
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: 250,
|
width: 250,
|
||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
onPressed: validateAndAddBeneficiary,
|
onPressed: validateAndAddBeneficiary,
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
shape: const StadiumBorder(),
|
shape: const StadiumBorder(),
|
||||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||||
|
backgroundColor:
|
||||||
|
Theme.of(context).colorScheme.primaryContainer,
|
||||||
|
foregroundColor:
|
||||||
|
Theme.of(context).colorScheme.onPrimaryContainer),
|
||||||
|
child: Text(
|
||||||
|
AppLocalizations.of(context).validateAndAdd,
|
||||||
|
style: const TextStyle(fontSize: 16),
|
||||||
),
|
),
|
||||||
child: Text(AppLocalizations.of(context).validateAndAdd),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@@ -81,59 +81,61 @@ class BeneficiaryDetailsScreen extends StatelessWidget {
|
|||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: Text(AppLocalizations.of(context).beneficiarydetails),
|
title: Text(AppLocalizations.of(context).beneficiarydetails),
|
||||||
),
|
),
|
||||||
body: Padding(
|
body: SafeArea(
|
||||||
padding: const EdgeInsets.all(16.0),
|
child: Padding(
|
||||||
child: Column(
|
padding: const EdgeInsets.all(16.0),
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
child: Column(
|
||||||
children: [
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
Row(
|
children: [
|
||||||
children: [
|
Row(
|
||||||
CircleAvatar(
|
children: [
|
||||||
radius: 24,
|
CircleAvatar(
|
||||||
backgroundColor: Colors.transparent,
|
radius: 24,
|
||||||
child: getBankLogo(beneficiary.bankName, context),
|
backgroundColor: Colors.transparent,
|
||||||
),
|
child: getBankLogo(beneficiary.bankName, context),
|
||||||
const SizedBox(width: 16),
|
),
|
||||||
Text(
|
const SizedBox(width: 16),
|
||||||
beneficiary.name,
|
Text(
|
||||||
style: const TextStyle(
|
beneficiary.name,
|
||||||
fontSize: 20, fontWeight: FontWeight.bold),
|
style: const TextStyle(
|
||||||
),
|
fontSize: 20, fontWeight: FontWeight.bold),
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
const SizedBox(height: 24),
|
),
|
||||||
_buildDetailRow('${AppLocalizations.of(context).bankName} ',
|
const SizedBox(height: 24),
|
||||||
beneficiary.bankName ?? 'N/A'),
|
_buildDetailRow('${AppLocalizations.of(context).bankName} ',
|
||||||
_buildDetailRow('${AppLocalizations.of(context).accountNumber} ',
|
beneficiary.bankName ?? 'N/A'),
|
||||||
beneficiary.accountNo),
|
_buildDetailRow('${AppLocalizations.of(context).accountNumber} ',
|
||||||
_buildDetailRow('${AppLocalizations.of(context).accountType} ',
|
beneficiary.accountNo),
|
||||||
beneficiary.accountType),
|
_buildDetailRow('${AppLocalizations.of(context).accountType} ',
|
||||||
_buildDetailRow('${AppLocalizations.of(context).ifscCode} ',
|
beneficiary.accountType),
|
||||||
beneficiary.ifscCode),
|
_buildDetailRow('${AppLocalizations.of(context).ifscCode} ',
|
||||||
_buildDetailRow('${AppLocalizations.of(context).branchName} ',
|
beneficiary.ifscCode),
|
||||||
beneficiary.branchName ?? 'N/A'),
|
_buildDetailRow('${AppLocalizations.of(context).branchName} ',
|
||||||
const Spacer(),
|
beneficiary.branchName ?? 'N/A'),
|
||||||
Row(
|
const Spacer(),
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
Row(
|
||||||
children: [
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
// ElevatedButton.icon(
|
children: [
|
||||||
// onPressed: () {
|
// ElevatedButton.icon(
|
||||||
// // Set Transaction Limit for this beneficiary
|
// onPressed: () {
|
||||||
// },
|
// // Set Transaction Limit for this beneficiary
|
||||||
// icon: const Icon(Icons.currency_rupee),
|
// },
|
||||||
// label: const Text('Set Limit'),
|
// icon: const Icon(Icons.currency_rupee),
|
||||||
// ),
|
// label: const Text('Set Limit'),
|
||||||
ElevatedButton.icon(
|
// ),
|
||||||
onPressed: () {
|
ElevatedButton.icon(
|
||||||
// Delete beneficiary option
|
onPressed: () {
|
||||||
_showDeleteConfirmationDialog(context);
|
// Delete beneficiary option
|
||||||
},
|
_showDeleteConfirmationDialog(context);
|
||||||
icon: const Icon(Icons.delete),
|
},
|
||||||
label: Text(AppLocalizations.of(context).delete),
|
icon: const Icon(Icons.delete),
|
||||||
),
|
label: Text(AppLocalizations.of(context).delete),
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user