Flutter
Is new design vision part implemented using new tokens?
Flutter
Is new design vision part implemented using new tokens?
OptimusDropDownButton<int>(
size: OptimusWidgetSize.large,
items: Iterable<int>.generate(10)
.map(
(i) => ListDropdownTile<int>(
value: i,
title: Text('Dropdown tile #$i'),
subtitle: Text('Subtitle #$i'),
),
)
.toList(),
onItemSelected: () {},
variant: OptimusDropdownButtonVariant.tertiary,
child: Text('Dropdown Button'),
);
OptimusDropdownButton Example
Name |
Description |
Type |
Default |
---|---|---|---|
size |
The size of the Dropdown Button. |
OptimusWidgetSize |
OptimusWidgetSize.large |
items |
The list of items in the Dropdown list. |
List<OptimusDropdownTile<T>> |
|
onItemSelected |
The action on the item being selected. |
ValueSetter<T>? |
|
variant |
The variant of the Dropdown Button. |
OptimusDropdownButtonVariant |
OptimusDropdownButtonVariant.tertiary |
child |
The content of the Button. Typically a text. |
Widget |
|