Tkko / Flutter_Pinput

Flutter package to create Pin code input text field with every pixel customization possibility 🎨 with beautiful animations, iOS autofill, Android autofill
https://pub.dev/packages/pinput
MIT License
775 stars 179 forks source link

edit single box #150

Open vungo99 opened 1 year ago

vungo99 commented 1 year ago

is available when pinput allows user to edit a single box?

Tkko commented 1 year ago

Hi @vungo99, it's not available yet.

vungo99 commented 1 year ago

tks for your reply. one more question about the edge case, when 2 or more SMS OTPs are sent at the same time, can pinput detect correctly SMS OTP from the right app's vendor? thank u so muchh

Tkko commented 1 year ago

@vungo99 If you enable smsRetrieverApi it will only read SMS that will have the application signature in the content. Check out the autofill section in the readme for more details.

vungo99 commented 1 year ago

Can I use smsCodeMatcher to detect OTP when message has many number like : "your account 123456 will receive OTP 654321 and has valid in 300s " => detect otp : 654321

Tkko commented 1 year ago

@vungo99 Yes, you can set a regex that will match the OTP instead of account id. Do both OTP and account Id have the same length?

vungo99 commented 1 year ago

Yes, they have the same length like : " your id 022C123456 will receive OTP 666666 in 300s". I write regex OTP\s*(\d{6}) but not work. Can you suggest regex for me ?? I try too much but it not work

Tkko commented 1 year ago

@vungo99 Try this regex r'\b(\d{6})\b'

vungo99 commented 1 year ago

smsCodeMatcher: '\b(\d{6})\b', right ?

Tkko commented 1 year ago
smsCodeMatcher: r'\b(\d{6})\b'
vungo99 commented 1 year ago

oh tk u so much !! It work like a charm :D

vungo99 commented 1 year ago

hi @Tkko , I have the issue : msg 1 : "TBC: your id 022C123456 will receive OTP 666666 in 300s " msg 2 : "your id 022C123456 will receive OTP 666666 in 300s" how can use regex to accept otp from msg1, not msg2

Tkko commented 1 year ago

Hey @vungo99, I usually ask regex questions to ChatGPT 🙈

vungo99 commented 1 year ago

I use it too, but can't apply 🙈🙈🙈