Add Beneficiary Animations and Localizations
This commit is contained in:
@@ -64,12 +64,12 @@ bool _isLoading = false; //for validateIFSC()
|
||||
|
||||
if (result == null) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(content: Text('Invalid IFSC code')),
|
||||
SnackBar(content: Text(AppLocalizations.of(context).invalidIfsc)),
|
||||
);
|
||||
bankNameController.clear();
|
||||
branchNameController.clear();
|
||||
} else {
|
||||
print("Valid IFSC: ${result.bankName}, ${result.branchName}");
|
||||
print("${AppLocalizations.of(context).validIfsc}: ${result.bankName}, ${result.branchName}");
|
||||
bankNameController.text = result.bankName;
|
||||
branchNameController.text = result.branchName;
|
||||
}
|
||||
@@ -118,7 +118,7 @@ void validateAndAddBeneficiary() async {
|
||||
} catch (e) {
|
||||
Navigator.pop(context); // Close the spinner
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(content: Text("Something went wrong during validation.")),
|
||||
SnackBar(content: Text(AppLocalizations.of(context).somethingWentWrong)),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -178,10 +178,10 @@ void validateAndAddBeneficiary() async {
|
||||
isDense: true,
|
||||
filled: true,
|
||||
fillColor: Theme.of(context).scaffoldBackgroundColor,
|
||||
enabledBorder: OutlineInputBorder(
|
||||
enabledBorder: const OutlineInputBorder(
|
||||
borderSide: BorderSide(color: Colors.black),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
focusedBorder: const OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: Colors.black,
|
||||
width: 2,
|
||||
@@ -213,10 +213,10 @@ void validateAndAddBeneficiary() async {
|
||||
isDense: true,
|
||||
filled: true,
|
||||
fillColor: Theme.of(context).scaffoldBackgroundColor,
|
||||
enabledBorder: OutlineInputBorder(
|
||||
enabledBorder: const OutlineInputBorder(
|
||||
borderSide: BorderSide(color: Colors.black),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
focusedBorder: const OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: Colors.black,
|
||||
width: 2,
|
||||
@@ -249,10 +249,10 @@ void validateAndAddBeneficiary() async {
|
||||
isDense: true,
|
||||
filled: true,
|
||||
fillColor: Theme.of(context).dialogBackgroundColor,
|
||||
enabledBorder: OutlineInputBorder(
|
||||
enabledBorder: const OutlineInputBorder(
|
||||
borderSide: BorderSide(color: Colors.black),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
focusedBorder: const OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: Colors.black,
|
||||
width: 2,
|
||||
@@ -271,14 +271,14 @@ void validateAndAddBeneficiary() async {
|
||||
controller: ifscController,
|
||||
decoration: InputDecoration(
|
||||
labelText: AppLocalizations.of(context).ifscCode,
|
||||
border: OutlineInputBorder(),
|
||||
border: const OutlineInputBorder(),
|
||||
isDense: true,
|
||||
filled: true,
|
||||
fillColor: Theme.of(context).scaffoldBackgroundColor,
|
||||
enabledBorder: OutlineInputBorder(
|
||||
enabledBorder: const OutlineInputBorder(
|
||||
borderSide: BorderSide(color: Colors.black),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
focusedBorder: const OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: Colors.black,
|
||||
width: 2,
|
||||
@@ -320,14 +320,14 @@ void validateAndAddBeneficiary() async {
|
||||
enabled: false, // changed from readOnly to disabled
|
||||
decoration: InputDecoration(
|
||||
labelText: AppLocalizations.of(context).bankName,
|
||||
border: OutlineInputBorder(),
|
||||
border: const OutlineInputBorder(),
|
||||
isDense: true,
|
||||
filled: true,
|
||||
fillColor: Theme.of(context).dialogBackgroundColor, // disabled color
|
||||
enabledBorder: OutlineInputBorder(
|
||||
enabledBorder: const OutlineInputBorder(
|
||||
borderSide: BorderSide(color: Colors.black),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
focusedBorder: const OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: Colors.black,
|
||||
width: 2,
|
||||
@@ -343,7 +343,7 @@ void validateAndAddBeneficiary() async {
|
||||
enabled: false, // changed from readOnly to disabled
|
||||
decoration: InputDecoration(
|
||||
labelText: AppLocalizations.of(context).branchName,
|
||||
border: OutlineInputBorder(),
|
||||
border: const OutlineInputBorder(),
|
||||
isDense: true,
|
||||
filled: true,
|
||||
fillColor: Theme.of(context).dialogBackgroundColor,
|
||||
|
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:lottie/lottie.dart';
|
||||
import 'package:confetti/confetti.dart';
|
||||
import 'dart:math';
|
||||
import '../../../l10n/app_localizations.dart';
|
||||
|
||||
class BeneficiaryResultPage extends StatefulWidget {
|
||||
final bool isSuccess;
|
||||
@@ -53,8 +54,8 @@ class _BeneficiaryResultPageState extends State<BeneficiaryResultPage> {
|
||||
const SizedBox(height: 20),
|
||||
Text(
|
||||
widget.isSuccess
|
||||
? 'Beneficiary Added Successfully!'
|
||||
: 'Beneficiary Addition Failed!',
|
||||
? AppLocalizations.of(context).beneficiaryAddedSuccess
|
||||
: AppLocalizations.of(context).beneficiaryAdditionFailed,
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold,
|
||||
|
Reference in New Issue
Block a user