SelectItemList class
A select item delegate that uses a static list of children.
SelectItemList provides select items from a pre-defined list of widgets. This is the simplest way to create a select dropdown with a fixed set of options.
Example:
SelectItemList(
children: [
SelectItem(value: 1, child: Text('Option 1')),
SelectItem(value: 2, child: Text('Option 2')),
SelectItem(value: 3, child: Text('Option 3')),
],
)
- Inheritance
-
- Object
- SelectItemDelegate
- SelectItemList
Constructors
-
SelectItemList({required List<
Widget> children}) -
Creates a SelectItemList with the specified children.
const
Properties
-
children
→ List<
Widget> -
The list of widgets to display as select items.
final
- estimatedChildCount → int
-
Estimated number of children in this delegate.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
build(
BuildContext context, int index) → Widget -
Builds a widget for the item at the given index.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
shouldRebuild(
covariant SelectItemList oldDelegate) → bool -
Determines if the widget should rebuild when value changes.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited