CNButtonData.popup constructor
const
CNButtonData.popup({
- CNSymbol? icon,
- IconData? customIcon,
- CNImageAsset? imageAsset,
- required List<
CNButtonDataPopupItem> ? popupItems, - required ValueChanged<
int> ? onMenuSelected, - bool enabled = true,
- Color? tint,
- CNButtonDataConfig config = const CNButtonDataConfig(),
Creates an icon-only popup menu button.
When popupItems is non-empty, tapping the button shows a native menu.
onMenuSelected is called with the index of the selected item.
Implementation
const CNButtonData.popup({
this.icon,
this.customIcon,
this.imageAsset,
required this.popupItems,
required this.onMenuSelected,
this.enabled = true,
this.tint,
this.config = const CNButtonDataConfig(),
}) : label = null,
isIcon = true,
badgeCount = null,
onPressed = null;