Open KawindaWAD opened 3 years ago
same issue cannot able to use backspace if the otp entered 3 digit wrongly.
same issue, please fix this.
is there anyway we can handle it
is there anyway we can handle it
You can use pin_code_fields & sms_retriever packages to auto-fill otp. pin_code_fields package solves the above problem. also, it has a lot of nice features. Use the sms_retriever package to read otp code from sms and use the controller to set otp code to PinCodeTextField().
_startListeningOtpCode() async {
String smsCode = await SmsRetriever.startListening();
_otpCode= getCode(smsCode);
print('SMS CODE: $_otpCode');
setState(() {
textEditingController.text = _otpCode;
});
SmsRetriever.stopListening();
}
https://pub.dev/packages/pin_code_fields https://pub.dev/packages/sms_retriever
First of all your package is really helpful and easy to use. But there is one issue I have noticed. Suppose that app has 6 digit pin field and the user has entered 3 digits and currently on the 4th pin field. If the 3rd digit is wrong, the user cannot directly use the backspace key or delete button on the keyboard to clear the 3rd pin. He has to click on the 3rd pin field before deleting the digit. It's really attractive if the user can directly use the backspace key to clear the previous pin without before click on it. I hope you have got my point and it will update on the upcoming version. Thank you!