MongolPopupMenuButton<T> constructor
const
MongolPopupMenuButton<T> ({
- Key? key,
- required MongolPopupMenuItemBuilder<
T> itemBuilder, - T? initialValue,
- MongolPopupMenuItemSelected<
T> ? onSelected, - MongolPopupMenuCanceled? onCanceled,
- String? tooltip,
- double? elevation,
- EdgeInsetsGeometry padding = const EdgeInsets.all(8.0),
- Widget? child,
- Widget? icon,
- double? iconSize,
- Offset offset = Offset.zero,
- bool enabled = true,
- ShapeBorder? shape,
- Color? color,
- bool? enableFeedback,
Creates a button that shows a popup menu.
The itemBuilder argument must not be null.
Implementation
const MongolPopupMenuButton({
Key? key,
required this.itemBuilder,
this.initialValue,
this.onSelected,
this.onCanceled,
this.tooltip,
this.elevation,
this.padding = const EdgeInsets.all(8.0),
this.child,
this.icon,
this.iconSize,
this.offset = Offset.zero,
this.enabled = true,
this.shape,
this.color,
this.enableFeedback,
}) : assert(
!(child != null && icon != null),
'You can only pass [child] or [icon], not both.',
),
super(key: key);