ToggleMenuFlyoutItem class

Represents an item in a MenuFlyout that a user can change between two states, checked or unchecked.

See also:

Inheritance

Constructors

ToggleMenuFlyoutItem.new({required Widget text, Widget? trailing, required bool value, required ValueChanged<bool>? onChanged, bool closeAfterClick = true})
Creates a menu flyout item that can be toggled on and off.

Properties

closeAfterClick bool
Whether to close the menu after the item is clicked.
finalinherited
focusNode FocusNode?
The focus node of the item.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
key Key?
finalinherited
leading Widget?
Displayed before text.
finalinherited
onChanged ValueChanged<bool>?
Called when the value of the toggle item changes.
final
onLongPress VoidCallback?
Called when the item is long pressed.
finalinherited
onPressed VoidCallback?
Called when the item is pressed.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selected bool
Whether this item is selected or not.
finalinherited
text Widget
The text displayed in this item.
finalinherited
trailing Widget?
Displayed after text.
finalinherited
value bool
The value of the toggle item.
final

Methods

build(BuildContext context) Widget
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
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