flutter-autocomplete-textfield icon indicating copy to clipboard operation
flutter-autocomplete-textfield copied to clipboard

Add Validator and keyboardAppearance properties

Open Geriko420 opened this issue 5 years ago • 3 comments

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,
),

Geriko420 avatar Mar 28 '19 11:03 Geriko420

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

hbdejesus avatar Mar 29 '19 03:03 hbdejesus

Thanks for the quick answer and the tutorial. I will try to do that way.

I will let you know :)

Best regards, Simon

Geriko420 avatar Mar 29 '19 08:03 Geriko420

+1

lucasriondel avatar Apr 03 '19 09:04 lucasriondel