ShadContextMenuRegion constructor

const ShadContextMenuRegion({
  1. Key? key,
  2. required Widget child,
  3. required List<Widget> items,
  4. bool? visible,
  5. BoxConstraints? constraints,
  6. ValueChanged<bool>? onHoverArea,
  7. EdgeInsetsGeometry? padding,
  8. Object? groupId,
  9. List<Effect>? effects,
  10. List<BoxShadow>? shadows,
  11. ShadDecoration? decoration,
  12. ImageFilter? filter,
  13. ShadContextMenuController? controller,
  14. Set<PointerDeviceKind>? supportedDevices,
  15. bool? longPressEnabled,
  16. bool? tapEnabled,
  17. HitTestBehavior hitTestBehavior = HitTestBehavior.opaque,
  18. Duration? popoverReverseDuration,
})

A widget that shows the context menu when the user right clicks the child or long presses it (only on android and ios), unless a value to longPressEnabled is provided.

On Android and iOS, tapping the child also shows the context menu by default. This can be overridden using tapEnabled.

Implementation

const ShadContextMenuRegion({
  super.key,
  required this.child,
  required this.items,
  this.visible,
  this.constraints,
  this.onHoverArea,
  this.padding,
  this.groupId,
  this.effects,
  this.shadows,
  this.decoration,
  this.filter,
  this.controller,
  this.supportedDevices,
  this.longPressEnabled,
  this.tapEnabled,
  this.hitTestBehavior = HitTestBehavior.opaque,
  this.popoverReverseDuration,
});