FPopoverMenu class

A popover menu displays a menu in a portal aligned to a child.

See:

Inheritance

Constructors

FPopoverMenu({FPopoverControl control = const .managed(), ScrollController? scrollController, FPopoverMenuStyleDelta style = const .context(), ScrollCacheExtent? scrollCacheExtent, double maxHeight = .infinity, bool intrinsicWidth = true, DragStartBehavior dragStartBehavior = .start, ScrollPhysics physics = const ClampingScrollPhysics(), FItemDivider divider = .full, AlignmentGeometry menuAnchor = .topCenter, AlignmentGeometry childAnchor = .bottomCenter, FPortalSpacing spacing = const .spacing(4), FPortalOverflow overflow = .flip, FPortalArrowAlignment? arrow, bool useViewPadding = true, bool useViewInsets = true, OverlayChildLocation overlayLocation = .nearestOverlay, Offset offset = .zero, Object? groupId, FPopoverHideRegion hideRegion = .excludeChild, VoidCallback? onTapHide, String? barrierSemanticsLabel, bool barrierSemanticsDismissible = true, bool cutout = true, void cutoutBuilder(Path path, Rect bounds) = FModalBarrier.defaultCutoutBuilder, String? semanticsLabel, bool? autofocus, FocusScopeNode? focusNode, FocusNode? childFocusNode, ValueChanged<bool>? onFocusChange, TraversalEdgeBehavior? traversalEdgeBehavior, bool? faded, List<FItemGroupMixin> menuBuilder(BuildContext context, FPopoverController controller, List<FItemGroupMixin>? menu) = defaultItemBuilder, List<FItemGroupMixin>? menu, ValueWidgetBuilder<FPopoverController> builder = FPopover.defaultBuilder, Widget? child, Key? key})
Creates a menu of FItems that is only shown when toggled.
FPopoverMenu.tiles({FPopoverControl control = const .managed(), ScrollController? scrollController, FPopoverMenuStyleDelta style = const .context(), ScrollCacheExtent? scrollCacheExtent, double maxHeight = .infinity, bool intrinsicWidth = true, DragStartBehavior dragStartBehavior = .start, ScrollPhysics physics = const ClampingScrollPhysics(), FItemDivider divider = .full, AlignmentGeometry menuAnchor = .topCenter, AlignmentGeometry childAnchor = .bottomCenter, FPortalSpacing spacing = const .spacing(4), FPortalOverflow overflow = .flip, FPortalArrowAlignment? arrow, bool useViewPadding = true, bool useViewInsets = true, OverlayChildLocation overlayLocation = .nearestOverlay, Offset offset = .zero, Object? groupId, FPopoverHideRegion hideRegion = .excludeChild, VoidCallback? onTapHide, String? barrierSemanticsLabel, bool barrierSemanticsDismissible = true, bool cutout = true, void cutoutBuilder(Path path, Rect bounds) = FModalBarrier.defaultCutoutBuilder, String? semanticsLabel, bool? autofocus, FocusScopeNode? focusNode, FocusNode? childFocusNode, ValueChanged<bool>? onFocusChange, TraversalEdgeBehavior? traversalEdgeBehavior, bool? faded, List<FTileGroupMixin> menuBuilder(BuildContext context, FPopoverController controller, List<FTileGroupMixin>? menu) = defaultTileBuilder, List<FTileGroupMixin>? menu, ValueWidgetBuilder<FPopoverController> builder = FPopover.defaultBuilder, Widget? child, Key? key})
Creates a menu of FTiles that is only shown when toggled.

Properties

arrow → FPortalArrowAlignment?
How the arrow should be aligned to the anchor. Defaults to null.
final
autofocus → bool?
True if this widget will be selected as the initial focus when no other node in its scope is currently focused.
final
barrierSemanticsDismissible → bool
Whether the barrier semantics are included in the semantics tree. Defaults to true.
final
barrierSemanticsLabel → String?
The popover's barrier label used by accessibility frameworks.
final
builder → ValueWidgetBuilder<FPopoverController>
An optional builder which returns the child widget that the popover is aligned to.
final
child → Widget?
The child.
final
childAnchor → AlignmentGeometry
The anchor point on the child used for positioning relative to the menuAnchor.
final
childFocusNode → FocusNode?
The builder/child's focus node that is focused when the popover is dismissed with the keyboard.
final
control → FPopoverControl
Defines how the popover menu's shown state is controlled.
final
cutout → bool
Whether the barrier should exclude the builder/child's area using a non-interactive cutout.
final
cutoutBuilder → void Function(Path path, Rect bounds)
An optional callback that customizes the cutout shape.
final
divider → FItemDivider
The divider between tiles.
final
dragStartBehavior → DragStartBehavior
Determines the way that drag start behavior is handled. Defaults to DragStartBehavior.start.
final
faded → bool?
Whether the parent menu fades when a submenu is active.
final
focusNode → FocusScopeNode?
An optional focus node to use as the focus node for this widget.
final
groupId → Object?
An optional group ID that groups TapRegions together so that they operate as one region. If a tap occurs outside of all group members, then group members that are shown will be hidden.
final
hashCode → int
The hash code for this object.
no setterinherited
hideRegion → FPopoverHideRegion
The region that can be tapped to hide the popover.
final
intrinsicWidth → bool
Whether the menu should intrinsically size to the widest child. Defaults to true.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
maxHeight → double
The max height, in logical pixels. Defaults to infinity.
final
The anchor point on the menu used for positioning relative to the childAnchor.
final
offset → Offset
Additional translation to apply to the popover's position.
final
onFocusChange → ValueChanged<bool>?
Handler called when the focus changes.
final
onTapHide → VoidCallback?
A callback that is called when the popover is hidden by tapping outside of it.
final
overflow → FPortalOverflow
The callback used to shift a popover when it overflows out of the viewport.
final
overlayLocation → OverlayChildLocation
The Overlay that the portal is attached to.
final
physics → ScrollPhysics
The scroll physics of the group. Defaults to ClampingScrollPhysics.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scrollCacheExtent → ScrollCacheExtent?
The scrollable area's cache extent.
final
scrollController → ScrollController?
The scroll controller used to control the position to which this group is scrolled.
final
semanticsLabel → String?
The menu's semantic label used by accessibility frameworks.
final
spacing → FPortalSpacing
The spacing between the popover and child anchors.
final
style → FPopoverMenuStyleDelta
The popover menu's style.
final
traversalEdgeBehavior → TraversalEdgeBehavior?
Controls the transfer of focus beyond the first and the last items in a popover. Defaults to TraversalEdgeBehavior.closedLoop.
final
useViewInsets → bool
Whether to avoid the platform view's insets (the soft keyboard).
final
useViewPadding → bool
Whether to avoid the platform view's padding (static safe areas like the notch and status bar).
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<FPopoverMenu>
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.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
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

Static Methods

defaultItemBuilder(BuildContext context, FPopoverController controller, List<FItemGroupMixin>? menu) → List<FItemGroupMixin>
The default item menu builder that returns the menu as-is.
defaultTileBuilder(BuildContext context, FPopoverController controller, List<FTileGroupMixin>? menu) → List<FTileGroupMixin>
The default tile menu builder that returns the menu as-is.