PlatformMenuItemGroup class Null safety
A class that groups other menu items into sections delineated by dividers.
Visual dividers will be added before and after this group if other menu items appear in the PlatformMenu, and the leading one omitted if it is first and the trailing one omitted if it is last in the menu.
Constructors
-
PlatformMenuItemGroup({required List<
MenuItem> members}) -
Creates a const PlatformMenuItemGroup.
const
Properties
-
descendants
→ List<
MenuItem> -
Returns all descendant
MenuItem
s of this item.read-onlyinherited - hashCode → int
-
The hash code for this object.
read-onlyinherited
-
members
→ List<
MenuItem> -
The
MenuItem
s that are members of this menu item group.final -
Returns any child
MenuItem
s of this item.read-onlyinherited - onClose → VoidCallback?
-
Returns a callback, if any, to be invoked if the platform menu receives a
"Menu.closed" method call from the platform for this item.
read-onlyinherited
- onOpen → VoidCallback?
-
Returns a callback, if any, to be invoked if the platform menu receives a
"Menu.opened" method call from the platform for this item.
read-onlyinherited
- onSelected → VoidCallback?
-
Returns a callback, if any, to be invoked if the platform menu receives a
"Menu.selectedCallback" method call from the platform for this item.
read-onlyinherited
- onSelectedIntent → Intent?
-
Returns an intent, if any, to be invoked if the platform receives a
"Menu.selectedCallback" method call from the platform for this item.
read-onlyinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
- shortcut → MenuSerializableShortcut?
-
The optional shortcut that selects this MenuItem.
read-onlyinherited
Methods
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
toChannelRepresentation(
PlatformMenuDelegate delegate, {required MenuItemSerializableIdGenerator getId}) → Iterable< Map< String, Object?> > -
Converts the representation of this item into a map suitable for sending
over the default "flutter/menu" channel used by DefaultPlatformMenuDelegate.
override
-
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
-
toStringShort(
) → String -
A brief description of this object, usually just the runtimeType and the
hashCode.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
serialize(
MenuItem group, PlatformMenuDelegate delegate, {required MenuItemSerializableIdGenerator getId}) → Iterable< Map< String, Object?> > - Converts the supplied object to the correct channel representation for the 'flutter/menu' channel.