TolyMenuItem class final
可执行或包含子菜单的菜单条目。
- Inheritance
-
- Object
- TolyMenuEntry
- TolyMenuItem
Constructors
-
TolyMenuItem({required String id, required String label, Widget? leading, Widget? trailing, String? shortcut, bool enabled = true, bool checked = false, List<
TolyMenuEntry> children = const <TolyMenuEntry>[], TolyMenuAction? onSelected}) -
const
Properties
- checked → bool
-
条目是否处于选中状态。
final
-
children
→ List<
TolyMenuEntry> -
子菜单条目。
final
- enabled → bool
-
条目是否允许交互。
final
- hasChildren → bool
-
当前条目是否包含下一级菜单。
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
条目的稳定标识。
finalinherited
- label → String
-
展示名称。
final
- leading → Widget?
-
名称左侧的自定义组件。
final
- onSelected → TolyMenuAction?
-
叶子条目被执行时的回调。
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shortcut → String?
-
快捷键提示文本。
final
- trailing → Widget?
-
名称右侧、展开箭头之前的自定义组件。
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited