why does this problem occur in Flutter?
The named parameter 'validator' isn't defined.
I did form and form key but it is still wrong.
I erased the rest for not being long.
This problem
TextField(
validator : (value){
if(value.isempty){
return 'Email must not be empty';
}
return null;
}
),
CodePudding user response:
Try to use TextFormField
instead of TextField
because TextField
doesn't use and functionality of Form
and validator
is functionality of Form
.
Refer this 3 errors in make components in flutter for more details.