-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Absence of focus node in credit_card_form.dart #40
Comments
Hello @NikhilKamathB, As card number is the first field so it doesn't require focus node. Closing this for now feel free to reopen If more information is required. |
meetjanani
added a commit
to meetjanani/flutter_credit_card
that referenced
this issue
Sep 28, 2021
….dart => As card number is the first field so it doesn't require focus node.
meetjanani
added a commit
to meetjanani/flutter_credit_card
that referenced
this issue
Oct 8, 2021
….dart => As card number is the first field so it doesn't require focus node.
meetjanani
added a commit
to meetjanani/flutter_credit_card
that referenced
this issue
Oct 8, 2021
….dart => As card number is the first field so it doesn't require focus node.
meetjanani
added a commit
to meetjanani/flutter_credit_card
that referenced
this issue
Oct 11, 2021
….dart => As card number is the first field so it doesn't require focus node.
meetjanani
added a commit
to meetjanani/flutter_credit_card
that referenced
this issue
Oct 11, 2021
….dart => As card number is the first field so it doesn't require focus node
meetjanani
pushed a commit
to meetjanani/flutter_credit_card
that referenced
this issue
Oct 11, 2021
….dart => As card number is the first field so it doesn't require focus node
meetjanani
pushed a commit
to meetjanani/flutter_credit_card
that referenced
this issue
Oct 11, 2021
….dart => As card number is the first field so it doesn't require focus node
vatsaltanna
pushed a commit
that referenced
this issue
Oct 11, 2021
As card number is the first field so it doesn't require focus node
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug
First and foremost thanks for this package. It was very helpful for my use-case, however when I tried to customize 'credit_card_form.dart' file, I found out that there was no focus node associated with 'cardNumber' textformfield, also disposal of this node ('cardNumberNode') was missing in the 'dispose' function.
Container( padding: const EdgeInsets.symmetric(vertical: 8.0), margin: const EdgeInsets.only(left: 16, top: 16, right: 16), child: TextFormField( obscureText: widget.obscureNumber, controller: _cardNumberController, cursorColor: widget.cursorColor ?? themeColor, onEditingComplete: () { FocusScope.of(context).requestFocus(expiryDateNode); }, style: TextStyle( color: widget.textColor, ), decoration: widget.cardNumberDecoration, keyboardType: TextInputType.number, textInputAction: TextInputAction.next, validator: (String value) { // Validate less that 13 digits +3 white spaces if (value.isEmpty || value.length < 16) { return widget.numberValidationMessage; } return null; }, ), ),
@override void dispose() { cardHolderNode.dispose(); cvvFocusNode.dispose(); expiryDateNode.dispose(); super.dispose(); }
need to insert
focusNode: cardHolderNode,
andcardNumberNode.dispose();
in lib/credit_card_form.dart (lines, between 177 - 196 and lines 150 - 155 respectively as per github (master)) otherwise, the package worked fine. Feel free to close this issue if insignificant.The text was updated successfully, but these errors were encountered: