jaumard / sms_autofill

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

Updated documentation about currentCode null vs empty #157

Closed cybex-dev closed 3 weeks ago

cybex-dev commented 2 years ago

Follows using setState({}) inside onCodeChanged resulting in build error if currentCode is null rather than just empty.

Code in question: https://github.com/jaumard/sms_autofill/blob/master/lib/sms_autofill.dart#L119

jaumard commented 1 year ago

Hey maybe instead of adding a note what we can do it wrap that call into an addPostFrameCallback, that will prevent any crash. What do you think?