ContextMenuButton<T> constructor

const ContextMenuButton<T>({
  1. Key? key,
  2. required Widget menu,
  3. String? tooltip,
  4. EdgeInsetsGeometry padding = const EdgeInsets.all(8.0),
  5. Widget? child,
  6. Widget? icon,
  7. Offset offset = Offset.zero,
  8. bool enabled = true,
  9. AlignmentGeometry aligment = AlignmentDirectional.topEnd,
  10. 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);