VxTextDropDown class
A material design button for selecting from a list of items.
A dropdown button lets the user select from a number of items. The button shows the currently selected item as well as an arrow that opens a menu for selecting another item.
The type T
is the type of the value
that each dropdown item represents.
All the entries in a given menu must represent values with consistent types.
Typically, an enum is used. Each DropdownMenuItem in items
must be
specialized with that same type argument.
The onChanged callback should update a state variable that defines the dropdown's value. It should also call State.setState to rebuild the dropdown with the new value.
{@tool dartpad --template=stateful_widget_scaffold_center}
This sample shows a DropdownButton
with a large arrow icon,
purple text style, and bold purple underline, whose value is one of "One",
"Two", "Free", or "Four".
- Available Extensions
Constructors
-
VxTextDropDown(List<
String> _items, {required String selectedValue, required ValueChanged<String?> onChanged})
Properties
- autoFocus → VxTextDropDown
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isDense → VxTextDropDown
-
no setter
- isExpanded → VxTextDropDown
-
no setter
-
onChanged
↔ ValueChanged<
String?> -
Called when user selects a value from drop down menu.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedValue ↔ String?
-
The value used to define currently selected value of VxTextDropDown.
getter/setter pair
Methods
-
disabledIconColor(
Color color) → VxTextDropDown -
elevation(
int val) → VxTextDropDown -
enabledIconColor(
Color color) → VxTextDropDown -
focusColor(
Color color) → VxTextDropDown -
icon(
Icon icon) → VxTextDropDown -
iconSize(
double val) → VxTextDropDown -
make(
{Key? key}) → StatefulBuilder -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
textStyle(
TextStyle style) → VxTextDropDown -
toString(
) → String -
A string representation of this object.
inherited
-
underLine(
Widget widget) → VxTextDropDown
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited