LiewJunTung / pin_code_text_field

A highly customisable Flutter widget for entering pin code. Suitable for use cases such as login and OTP.
MIT License
376 stars 78 forks source link

show entire code when pasting #29

Closed mozesma closed 4 years ago

mozesma commented 5 years ago

on iOS device when you start an OTP flow (SMS verification) and you get the SMS, the keyboard will suggest the use the code from the SMS, tapping that suggestion will paste the code in the PinCodeTextField.

the logic works, but visually in this case you will only see the last digit on the last place, and the rest of the fields will remain empty.

this fix makes it so whenever a text is change it will fill all of the input text from the last known position up to the text.length, therefore resolving the above issue

LiewJunTung commented 5 years ago

I'm not too familiar with such flow. Is it possible for you to send me a video how it works, please?

agacia commented 4 years ago

@LiewJunTung, Take a look at this GIF confirming that this fix works. Looking forward to seeing this fix merged! fix

@MozesMa, Thank you!

LiewJunTung commented 4 years ago

I see, alright. I'll believe you @agacia . 😄 Will have this in the upcoming version