CNPopupMenuButton.icon constructor
CNPopupMenuButton.icon({
- Key? key,
- CNSymbol? buttonIcon,
- IconData? buttonCustomIcon,
- CNImageAsset? buttonImageAsset,
- required List<
CNPopupMenuEntry> items, - required ValueChanged<
int> onSelected, - Color? tint,
- double size = 44.0,
- CNButtonStyle buttonStyle = CNButtonStyle.glass,
Creates a round, icon-only popup menu button.
Implementation
CNPopupMenuButton.icon({
super.key,
this.buttonIcon,
this.buttonCustomIcon,
this.buttonImageAsset,
required this.items,
required this.onSelected,
this.tint,
double size = 44.0, // button diameter (width = height)
this.buttonStyle = CNButtonStyle.glass,
}) : buttonLabel = null,
round = true,
width = size,
height = size,
shrinkWrap = false,
super() {
assert(
buttonIcon != null ||
buttonCustomIcon != null ||
buttonImageAsset != null,
'At least one of buttonIcon, buttonCustomIcon, or buttonImageAsset must be provided',
);
}