select_form_field
A Flutter select field widget. It shows a list of options in a dropdown menu.
This widget extend TextField and has a similar behavior as TextFormField
Usage
In the pubspec.yaml
of your flutter project, add the following dependency:
In your library add the following import:
For help getting started with Flutter, view the online documentation.
Example
Set items using a List map passing:
value
: [String],textStyle
: [TextStyle | null],label
: [String | null],icon
: [Widget | null],enable
: [bool | null],
The result of val in onChanged
, validator
and onSaved
will be a String.
So, if you tap on Box Label item on select menu the result will be boxValue
.