ShadContextMenu class

Inheritance
Available extensions

Constructors

ShadContextMenu({Key? key, required Widget child, required List<Widget> items, ShadAnchorBase? anchor, bool? visible, BoxConstraints? constraints, ValueChanged<bool>? onHoverArea, EdgeInsetsGeometry? padding, Object? groupId, List<Effect>? effects, List<BoxShadow>? shadows, ShadDecoration? decoration, ImageFilter? filter, ShadContextMenuController? controller, TapRegionCallback? onTapOutside, TapRegionCallback? onTapInside, TapRegionUpCallback? onTapUpInside, TapRegionUpCallback? onTapUpOutside, Duration? popoverReverseDuration})
const

Properties

anchor ShadAnchorBase?
The anchor of the context menu.
final
child Widget
The child of the context menu.
final
constraints BoxConstraints?
The constraints of the context menu, defaults to BoxConstraints(minWidth: 128).
final
controller ShadContextMenuController?
The controller of the context menu, starts from isOpen set to false.
final
decoration ShadDecoration?
The decoration of the popover.
final
effects List<Effect>?
The animation effects applied to the popover. Defaults to FadeEffect(), ScaleEffect(begin: Offset(.95, .95), end: Offset(1, 1)), MoveEffect(begin: Offset(0, 2), end: Offset(0, 0)).
final
filter ImageFilter?
The filter of the popover. If null, falls back to ShadPopoverTheme.
final
groupId Object?
An optional group ID that groups ShadMouseAreas together so that they operate as one region. If any member of a group is hit by a particular hover, then all members will have their onEnter or onExit called.
final
hashCode int
The hash code for this object.
no setterinherited
items List<Widget>
The items of the context menu.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onHoverArea ValueChanged<bool>?
The callback called when the hover area changes.
final
onTapInside TapRegionCallback?
A callback to be invoked when a tap down is detected inside of this TapRegion, or any other tap region with the same groupId, if any.
final
onTapOutside TapRegionCallback?
A callback to be invoked when a tap down is detected outside of this TapRegion and any other region with the same groupId, if any.
final
onTapUpInside TapRegionUpCallback?
A callback to be invoked when a tap up is detected inside of this TapRegion, or any other tap region with the same groupId, if any.
final
onTapUpOutside TapRegionUpCallback?
A callback to be invoked when a tap up is detected outside of this TapRegion and any other region with the same groupId, if any.
final
padding EdgeInsetsGeometry?
The padding of the context menu, defaults to EdgeInsets.symmetric(vertical: 4).
final
popoverReverseDuration Duration?
The duration of the popover's exit animation.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shadows List<BoxShadow>?
The shadows applied to the popover, defaults to Shadows.md.
final
visible bool?
Whether the context menu is visible, defaults to null.
final

Methods

animate({Key? key, List<Effect>? effects, AnimateCallback? onInit, AnimateCallback? onPlay, AnimateCallback? onComplete, bool? autoPlay, Duration? delay, AnimationController? controller, Adapter? adapter, double? target, double? value}) Animate

Available on Widget, provided by the AnimateWidgetExtensions extension

Wraps the target Widget in an Animate instance, and returns the instance for chaining calls. Ex. myWidget.animate() is equivalent to Animate(child: myWidget).
createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<ShadContextMenu>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
positionedWith(ShadPosition position) Widget

Available on Widget, provided by the PositionedExt extension

toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited