Flutter_Pinput icon indicating copy to clipboard operation
Flutter_Pinput copied to clipboard

edit single box

Open vungo99 opened this issue 1 year ago • 13 comments

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

vungo99 avatar Oct 25 '23 04:10 vungo99

Hi @vungo99, it's not available yet.

Tkko avatar Oct 25 '23 04:10 Tkko

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

vungo99 avatar Oct 25 '23 06:10 vungo99

@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.

Tkko avatar Oct 25 '23 14:10 Tkko

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

vungo99 avatar Oct 31 '23 11:10 vungo99

@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?

Tkko avatar Oct 31 '23 11:10 Tkko

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

vungo99 avatar Oct 31 '23 11:10 vungo99

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

Tkko avatar Oct 31 '23 12:10 Tkko

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

vungo99 avatar Oct 31 '23 12:10 vungo99

smsCodeMatcher: r'\b(\d{6})\b'

Tkko avatar Oct 31 '23 13:10 Tkko

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

vungo99 avatar Oct 31 '23 13:10 vungo99

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

vungo99 avatar Nov 09 '23 09:11 vungo99

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

Tkko avatar Nov 09 '23 09:11 Tkko

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

vungo99 avatar Nov 09 '23 09:11 vungo99