Closed levishai closed 3 years ago
If you use Dart SDK lower than 2.12, the code is slightly different - the example is null safe(you can see Null safety
at the bottom right corner in the interactive example).
See https://dart.dev/null-safety for more information about null safety. :-)
Yes, @JuYeong0413 is correct. We have been migrating the flutter.dev website to null safety. Closing.
Page URL: https://flutter.dev/docs/cookbook/forms/validation.html Page source: https://github.com/flutter/website/tree/master/src/docs/cookbook/forms/validation.md
Description of issue: In the section "Create a button to validate and submit the form" (and in the interative example) I see this line of code:
if (_formKey.currentState!.validate()) {
I think that the '!' should not be there. I get error in android studio when trying it that way and also can find such operator '!.'...
Do I miss something?
Thanks, Shai