sms_autofill
sms_autofill copied to clipboard
Issue: PinFieldAutoFill - Double tap to manually enter OTP, even when FocusNode has the focus
I am facing an issue in PinFieldAutoFill while manually entering the OTP, where:
- Single tap on the OTP Field opens the keyboard, but unable to type.
- I need to tap on the field widget again to be able to start typing, else nothing happens on pressing keys on the keyboard.
- Tried to fix it by setting focus through FocusNode programmatically, but setting focus to active only opens keyboard and the user is unable to enter any text until he clicks the text field widget again.
@gauravdhingra9 tengo el mismo problema pudiste solucionarlo?
i have the same issue
Give a parameter currentCode: "" and it will work perfectly
PinFieldAutoFill( keyboardType: TextInputType.number, cursor: Cursor(color: peach, enabled: true, width: 1), autoFocus: true, controller: _pinController, codeLength: 6, currentCode: "", decoration: BoxLooseDecoration( textStyle: TextStyle(color: Colors.black), radius: Radius.circular(1), strokeColorBuilder: FixedColorBuilder(Colors.black)), onCodeChanged: (pin) { if (pin.length == 6) { signInWithPhoneNumber(pin); } }, ),
The same issue, Used currentCode: "".. but not worked for me
The same issue, Used currentCode: "".. but not worked for me
Could you please confirm package version of PinFieldAutoFill you are using
Used sms_autofill: ^2.1.2
Center( child: Padding( padding: const EdgeInsets.fromLTRB(32.0, 8, 32, 8), child: PinFieldAutoFill( codeLength: 4, cursor: Cursor(color: kPrimaryColor, enabled: true, width: 1), autoFocus: true, decoration: UnderlineDecoration( textStyle: TextStyle(fontSize: 24, color: Colors.black), colorBuilder: FixedColorBuilder(Colors.black.withOpacity(0.1)), ), currentCode: "", onCodeSubmitted: (code) {}, onCodeChanged: (code) { }, ), ), ),
Finally, its worked for me when I changed the stateless widget to state full widget...
i'm having the same issue when warped inside a Column widget.