ContextMenuButton<T> constructor
const
ContextMenuButton<T> ({
- Key? key,
- String? tooltip,
- EdgeInsetsGeometry padding = const EdgeInsets.all(8.0),
- Widget? child,
- Widget? icon,
- Offset offset = Offset.zero,
- bool enabled = true,
- AlignmentGeometry aligment = AlignmentDirectional.topEnd,
- AlignmentGeometry originAligment = AlignmentDirectional.topStart,
Creates a button that shows a popup menu.
The itemBuilder argument must not be null.
Implementation
const ContextMenuButton({
Key? key,
required this.menu,
this.tooltip,
this.padding = const EdgeInsets.all(8.0),
this.child,
this.icon,
this.offset = Offset.zero,
this.enabled = true,
this.aligment = AlignmentDirectional.topEnd,
this.originAligment = AlignmentDirectional.topStart,
}) : assert(!(child != null && icon != null),
'You can only pass [child] or [icon], not both.'),
super(key: key);