jaumard / sms_autofill

Flutter plugin to provide SMS code autofill support
MIT License
289 stars 184 forks source link

Issue: PinFieldAutoFill - Double tap to manually enter OTP, even when FocusNode has the focus #118

Open gauravdhingra9 opened 3 years ago

gauravdhingra9 commented 3 years ago

I am facing an issue in PinFieldAutoFill while manually entering the OTP, where:

miguelflores1993 commented 3 years ago

@gauravdhingra9 tengo el mismo problema pudiste solucionarlo?

15520065 commented 3 years ago

i have the same issue

guptan404 commented 3 years ago

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); } }, ),

arasu33 commented 3 years ago

The same issue, Used currentCode: "".. but not worked for me

guptan404 commented 2 years ago

The same issue, Used currentCode: "".. but not worked for me

Could you please confirm package version of PinFieldAutoFill you are using

arasu33 commented 2 years ago

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) { }, ), ), ),

arasu33 commented 2 years ago

Finally, its worked for me when I changed the stateless widget to state full widget...

darshanm0 commented 2 years ago

i'm having the same issue when warped inside a Column widget.