TinoGuo / pin_input_text_field

A textField widget to help display different style pin
Apache License 2.0
374 stars 81 forks source link

[feature] add autofillHints and deprecate autovalidate with autovalidateMode #51

Closed daveols closed 3 years ago

daveols commented 3 years ago

~Use AutoFillHints.oneTimeCode by default to enable better platform support for OTP code inputs.~

~This can be controlled via enableCodeAutofill, which defaults to true.~

~See: https://api.flutter.dev/flutter/services/AutofillHints/oneTimeCode-constant.html~

Update

For more flexibility this PR just exposes autofillHints on the underlying TextField so that users can add whatever they want without any default behaviour.

I've also added a proper deprecation notice for autovalidate and exposed it's replacement (autovalidateMode) which defaults to the same behaviour.

daveols commented 3 years ago

@TinoGuo flutter analyze is failing due to the usage of deprecated autovalidate. Would you like me to remove this in the same PR?

daveols commented 3 years ago

Done! So this PR will break implementations using autovalidate. Might need to bump the major.

daveols commented 3 years ago

@TinoGuo I've updated the PR 🎉