Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'autovalidate' is deprecated and shouldn't be used - sign_in_form.dart #15

Open
moshe7 opened this issue Oct 28, 2020 · 5 comments
Open

Comments

@moshe7
Copy link

moshe7 commented Oct 28, 2020

It is no longer possible to put a primitive value in "autovalidate" of Form
What is your recommendation for State value?

@pedromassango
Copy link

replace autovalidate: true by autovalidateMode: AutovalidateMode.always.

See the link bellow for more options
https://master-api.flutter.dev/flutter/widgets/AutovalidateMode-class.html

@moshe7
Copy link
Author

moshe7 commented Oct 28, 2020

Thanks, @pedromassango.
Yes, I know that. but I wonder more about design, what is better to leave State as a primitive bool and do a conversion or change the State to AutovalidateMode Enum

@BrianMwas
Copy link

I also think setting the type to AutovalidateMode will make it more readable. Setting its initial state to AutovalidateMode.disabled would be the same as false.

@moshe7
Copy link
Author

moshe7 commented Nov 8, 2020

more readable, but coupling the "state" to the "autovalidate"

@EmmanuelAmet
Copy link

autovalidate has been depreciated, now you need to use autovalidateMode: AutovalidateMode.always
checkout the flutter documentation for it via:
https://docs.flutter.dev/release/breaking-changes/form-field-autovalidation-api

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants