Dropdown Button

A Dropdown Button groups multiple actions in one triggering UI element, optimizing the space in condensed areas or action-heavy pages.

Component checklist

Flutter

Is new design vision part implemented using new tokens?

Update required

Resources

 

Examples

Buttons/Dropdown Button


                                                        
                                                        
                                                            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

API

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