jaumard / sms_autofill

Flutter plugin to provide SMS code autofill support
MIT License
281 stars 173 forks source link

Is it possible can i read OTP and set it as text for controller ? Insted of using PinTextFieldFill can i use TextFormField ? #149

Open phanindravarma412 opened 2 years ago

sharmaAshish-dev commented 2 years ago

yes you can, Just use _codeController..text = _code; in onCodeChanged function

danishkhawaja98 commented 1 year ago

Hi @phanindravarma412 Yes you can by using SmsAutoFill().code;

It returns a Stream of type String.

You can make a StreamBuilder and place a TextField or TextFormField in its builder when the snapshot has data and edit its controller with the snapshot.data