DropdownGroup<T> class
Represents a named group of dropdown items.
Groups are rendered with a section header in the dropdown list, allowing items to be organized into logical categories.
final groups = [
DropdownGroup(label: 'Fruits', items: [
DropdownItem(label: 'Apple', value: 'apple'),
DropdownItem(label: 'Banana', value: 'banana'),
]),
DropdownGroup(label: 'Vegetables', items: [
DropdownItem(label: 'Carrot', value: 'carrot'),
]),
];
Constructors
-
DropdownGroup({required String label, required List<
DropdownItem< items})T> > -
Creates a new DropdownGroup with the given
labelanditems.const
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
-
items
→ List<
DropdownItem< T> > -
The dropdown items belonging to this group.
final
- label → String
-
The display label for this group's section header.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{String? label, List< DropdownItem< ? items}) → DropdownGroup<T> >T> - Creates a copy of this DropdownGroup with the specified overrides.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override