I have recently started with a Flutter project and using a tutorial to learn while working on it. I am getting an error: The method ‘TypeAheadFormField’ isn’t defined for the type ‘SellProductScreen’.
Try correcting the name to the name of an existing method, or defining a method named ‘TypeAheadFormField’. when using the Typeahead package. Another error in the next line is: The method ‘TextFieldConfiguration’ isn’t defined for the type ‘SellProductScreen’. I am trying to use it to get maps suggestions. Any help is appreciated.
I have tried to find resources to help me with this but unfortunately I couldn’t find anywhere on how to resolve this. The code in which the error I got is:
TypeAheadFormField<String>(
textFieldConfiguration: TextFieldConfiguration(
decoration: InputDecoration(
border: OutlineInputBorder(),
),
controller: TextEditingController(text: sellProductController.location.value),
onChanged: (value) {
sellProductController.location.value = value;
},
),
HamAraAym is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.