IFSC Field Testing #2
This commit is contained in:
@@ -39,6 +39,7 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
final phoneController = TextEditingController();
|
||||
final amountController = TextEditingController();
|
||||
final remarksController = TextEditingController();
|
||||
final _ifscFocusNode = FocusNode();
|
||||
final service = getIt<BeneficiaryService>();
|
||||
|
||||
late String accountType;
|
||||
@@ -49,6 +50,11 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_ifscFocusNode.addListener(() {
|
||||
if (!_ifscFocusNode.hasFocus && ifscController.text.trim().length == 11) {
|
||||
_validateIFSC();
|
||||
}
|
||||
});
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
setState(() {
|
||||
accountType = 'Savings';
|
||||
@@ -139,6 +145,7 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
amountController.dispose();
|
||||
remarksController.dispose();
|
||||
super.dispose();
|
||||
_ifscFocusNode.dispose();
|
||||
}
|
||||
|
||||
void _onProceedToPay() {
|
||||
@@ -479,6 +486,7 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
children: [
|
||||
Expanded(
|
||||
child: TextFormField(
|
||||
focusNode: _ifscFocusNode,
|
||||
maxLength: 11,
|
||||
inputFormatters: [
|
||||
LengthLimitingTextInputFormatter(11),
|
||||
@@ -501,9 +509,6 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
),
|
||||
controller: ifscController,
|
||||
textInputAction: TextInputAction.next,
|
||||
onFieldSubmitted: (_) {
|
||||
_validateIFSC();
|
||||
},
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
final trimmed = value.trim().toUpperCase();
|
||||
|
||||
Reference in New Issue
Block a user