Open moshe7 opened 4 years ago
replace autovalidate: true
by autovalidateMode: AutovalidateMode.always
.
See the link bellow for more options https://master-api.flutter.dev/flutter/widgets/AutovalidateMode-class.html
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
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.
more readable, but coupling the "state" to the "autovalidate"
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
It is no longer possible to put a primitive value in "autovalidate" of Form What is your recommendation for State value?