TMenuItemData<T extends TMenuItemData<T>> class abstract

Generic contract for anything the shared overlay-menu engine (TMenuOverlayPanel / TMenuOverlayItem / TMenuRootTrigger) can render.

TDropdownItem and TSidebarItem both extends this instead of each re-implementing hover/overlay/positioning logic on their own model. Extend (not just implement) so the default hasVisibleChildren / visibleChildren / isHidden implementations are inherited for free — override them only where a concrete item type needs different rules (e.g. TSidebarItem.isHidden also hides route-less leaf items).

Implementers

Constructors

TMenuItemData()
const

Properties

authTarget → TAuthTarget
Which TAuthTarget default applies to this kind of item.
no setter
children → List<T>?
no setter
color → Color?
no setter
customContent → Widget?
no setter
hashCode → int
The hash code for this object.
no setterinherited
hasVisibleChildren → bool
no setter
hidden → bool
no setter
hidesWhenEmpty → bool
Whether a route-less group with no visible children should disappear.
no setter
icon → dynamic
no setter
isClickable → bool
no setter
isHidden → bool
no setter
onDenied → TAuthMode?
Overrides the denied behaviour for this item.
no setter
permission → Object?
Permission (String or TPermission) required for this item.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
text → String?
no setter
visibleChildren → List<T>
no setter

Methods

authResult(BuildContext context) → TAuthResult
hasVisibleChildrenIn(BuildContext context) → bool
isClickableIn(BuildContext context) → bool
Context-aware isClickable: false when the item is disabled by permission.
isHiddenIn(BuildContext context) → bool
Context-aware isHidden: also honours permissions, recursively.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
tap(BuildContext context) → void
Invoked when the item itself (not a child with a submenu) is activated.
toString() → String
A string representation of this object.
inherited
visibleChildrenIn(BuildContext context) → List<T>

Operators

operator ==(Object other) → bool
The equality operator.
inherited