Use the overflow menu component when additional options are available to the user but there is a space constraint.
Property | Description |
---|
| An object that is used to control the menu. Type: COverflowMenuController
|
| A list of COverflowMenuItem to display in a column when the menu is open. Type: List<COverflowMenuItem>
|
| The child contained by the menu. |
| A method called after the menu is open. |
| A method called after the menu is closed. |
| Whether you can close the menu by tapping the barrier. |
| The adjustment in the position applied to the menu. |
| The size of this menu. It can be regular , sm , or md . Default: COverflowMenuSize.md
|
Property | Description |
---|
| |
| Called when the item is tapped. |
| Whether the item is enabled or not. |
| Whether this item has a divider. |
| To make this menu item a danger ghost button. |
Property | Description |
---|
| |
| A list of COverflowMenuItem to display in a column when the menu is open. Type: List<COverflowMenuItem>
|
| Whether the button is enabled or not. |
| Whether you can close the menu by tapping the barrier. |
| A method called after the menu is closed. |
| A method called after the menu is open. |
| The adjustment in the position applied to the menu. |
| The size of this menu. It can be regular , sm , or md . Default: COverflowMenuSize.md
|
COverflowMenu(
controller: controller,
child: CButton(
label: 'Menu Button',
onTap: () {
controller.open()
},
),
items: [
COverflowMenuItem(
child: CText(data:'hello'),
onTap: (){ }
),
COverflowMenuItem(
isDelete: true,
child: CText(data:'hello'),
onTap: (){ }
),
],
);
// -----
COverflowMenuButton(
icon: Icon(CIcons.add),
items: [
COverflowMenuItem(
child: CText(data:'hello'),
onTap: (){ }
),
COverflowMenuItem(
isDelete: true,
child: CText(data:'hello'),
onTap: (){ }
),
],
);