7
answers
1
watching
258
views

Trying to fix a flutter form widget from a widget book written in 2019. I fixed a few
but having issues with some parts of the code. String? Function(String?) validator = (String? inValue)
Flutter says too many positional arguments, but 1 found.
Try removing the extra positional arguments or specifying the name for named arguments
Abstract classes can't be instantiated.
Try creating an instance of a concrete subsytem
Add required position parameter.

Here's more of the code TextFormField(
keyboardType:
TextInputType.emailAddress,
String? Function(String?) validator = (String? inValue) {
if (inValue.length == 0) {
//do something
return "Please enter username";
}
return null;

For unlimited access to Homework Help, a Homework+ subscription is required.

Avatar image
Liked by dragon2020 and 3 others

Unlock all answers

Get 1 free homework help answer.
Already have an account? Log in
Avatar image
Liked by dragon2020 and 1 others
Already have an account? Log in
Avatar image
Liked by dragon2020 and 1 others
Already have an account? Log in
Avatar image
Liked by dragon2020 and 1 others
Already have an account? Log in
Avatar image
Liked by dragon2020 and 3 others
Already have an account? Log in
Avatar image
Read by 1 person
Already have an account? Log in
Avatar image
Read by 1 person
Already have an account? Log in
Start filling in the gaps now
Log in