FSubmenuItem class

An item that opens a nested popover menu.

Used inside FPopoverMenu to create hierarchical menus. For touch-oriented submenus, use FSubmenuTile.

See:

Inheritance
Mixed-in types

Constructors

FSubmenuItem({required Widget title, required List<FItemGroupMixin> submenu, FPopoverControl control = const .managed(), FItemVariant variant = .primary, FItemStyleDelta style = const .context(), bool? enabled, String? semanticsLabel, bool autofocus = false, FocusNode? focusNode, ValueChanged<bool>? onFocusChange, ValueChanged<bool>? onHoverChange, FTappableVariantChangeCallback? onVariantChange, VoidCallback? onLongPress, VoidCallback? onDoubleTap, VoidCallback? onSecondaryPress, VoidCallback? onSecondaryLongPress, Map<ShortcutActivator, Intent>? shortcuts, Map<Type, Action<Intent>>? actions, Widget? prefix, Widget? subtitle, Widget? suffix, FPopoverMenuStyleDelta submenuStyle = const .context(), AlignmentGeometry? submenuAnchor, AlignmentGeometry? itemAnchor, ScrollController? submenuScrollController, double? submenuCacheExtent, bool? submenuIntrinsicWidth, DragStartBehavior submenuDragStartBehavior = .start, FPortalSpacing submenuSpacing = const .spacing(2), FPortalOverflow submenuOverflow = .flip, Offset submenuOffset = .zero, String? submenuSemanticsLabel, bool submenuUseViewPadding = true, bool submenuUseViewInsets = true, bool? submenuAutofocus, FocusScopeNode? submenuFocusNode, ValueChanged<bool>? submenuOnFocusChange, TraversalEdgeBehavior? submenuTraversalEdgeBehavior, double submenuMaxHeight = .infinity, FItemDivider submenuDivider = .full, Key? key})
Creates a FSubmenuItem.
const

Properties

actions Map<Type, Action<Intent>>?
The actions for the trigger item.
final
autofocus bool
Whether the item should be focused on initial build.
final
control FPopoverControl
The popover control.
final
enabled bool?
Whether the item is enabled. Defaults to true.
final
focusNode FocusNode?
The focus node used by the trigger item.
final
hashCode int
The hash code for this object.
no setterinherited
itemAnchor AlignmentGeometry?
The anchor point on the trigger item used for positioning.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onDoubleTap VoidCallback?
Called when the trigger item is double-tapped.
final
onFocusChange ValueChanged<bool>?
Called when the focus state of the trigger item changes.
final
onHoverChange ValueChanged<bool>?
Called when the hover state of the trigger item changes.
final
onLongPress VoidCallback?
Called when the trigger item is long-pressed.
final
onSecondaryLongPress VoidCallback?
Called when the trigger item is secondary-long-pressed.
final
onSecondaryPress VoidCallback?
Called when the trigger item is secondary-pressed (right click).
final
onVariantChange FTappableVariantChangeCallback?
Called when the variant state of the trigger item changes.
final
prefix Widget?
The widget displayed before the title.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
semanticsLabel String?
The semantic label used by accessibility frameworks.
final
shortcuts Map<ShortcutActivator, Intent>?
The keyboard shortcuts for the trigger item.
final
style FItemStyleDelta
The trigger item's style.
final
The submenu items.
final
The anchor point on the submenu used for positioning.
final
Whether the submenu should be auto-focused.
final
The submenu's cache extent in logical pixels.
final
The divider between submenu items.
final
The submenu's drag start behavior.
final
The submenu's focus node.
final
Whether the submenu should size itself to the intrinsic width of its children.
final
The submenu's max height. Defaults to infinity.
final
The submenu's additional translation offset.
final
Called when the focus state of the submenu changes.
final
The submenu's overflow strategy.
final
The submenu's scroll controller.
final
The submenu's semantic label.
final
The spacing between the submenu and the trigger item.
final
The submenu's popover style.
final
The submenu's traversal edge behavior.
final
Whether the submenu should use the view's insets.
final
Whether the submenu should use the view's padding.
final
subtitle Widget?
The subtitle widget displayed below the title.
final
suffix Widget?
The widget displayed after the title. Defaults to a chevron-right icon.
final
title Widget
The title widget.
final
variant FItemVariant
The item's variant.
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
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