CNButtonData.popup constructor

const CNButtonData.popup({
  1. CNSymbol? icon,
  2. IconData? customIcon,
  3. CNImageAsset? imageAsset,
  4. required List<CNButtonDataPopupItem>? popupItems,
  5. required ValueChanged<int>? onMenuSelected,
  6. bool enabled = true,
  7. Color? tint,
  8. 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;