flutter-autocomplete-textfield
flutter-autocomplete-textfield copied to clipboard
Add Validator and keyboardAppearance properties
Like in TextFormFields, it could be great if we can add the Validator property and the keyboardAppearance property.
Example for the Validator property :
TextFormField(
// The validator receives the text the user has typed in
validator: (value) {
if (value.isEmpty) {
return 'Please enter some text';
}
},
);
And for instance the keyboardAppearance property :
TextFormField(
// Here to apply a white keyboard
keyboardAppearance: Brightness.light,
),
Form the meantime you can try making your own widget that extends the FormField class just like the TextFormField then just return the AutoCompleteTextField on the build parameter.
Edit: Here's a link to a tutorial on how to make your own FormField widget. https://medium.com/saugo360/creating-custom-form-fields-in-flutter-85a8f46c2f41
Thanks for the quick answer and the tutorial. I will try to do that way.
I will let you know :)
Best regards, Simon
+1