AdaptiveAction<T extends Object> class final

An immutable, platform-neutral action node.

A node can carry an invocation payload, children, or both. Renderers decide how to present the node in its resolved region; moving a node never changes or flattens its children. Core never invokes payload. A renderer hands an enabled node's payload back to a caller-owned handler and preserves child navigation as a separate interaction.

action       payload
menu                  -> child -> child
composite    payload  -> child -> child
Inheritance

Constructors

AdaptiveAction.action({required ActionId id, required ActionMetadata metadata, required T payload, bool isEnabled = true, ActionPlacementPolicy? placementPolicy})
Creates a leaf that invokes payload.
factory
AdaptiveAction.composite({required ActionId id, required ActionMetadata metadata, required T payload, required Iterable<AdaptiveMenuEntry<T>> children, bool isEnabled = true, ActionPlacementPolicy? placementPolicy})
Creates a branch that can both invoke payload and open children.
factory
AdaptiveAction.menu({required ActionId id, required ActionMetadata metadata, required Iterable<AdaptiveMenuEntry<T>> children, bool isEnabled = true, ActionPlacementPolicy? placementPolicy})
Creates a branch that opens children without invoking a payload.
factory

Properties

children List<AdaptiveMenuEntry<T>>
The node's menu entries in declaration order.
final
hashCode int
The hash code for this object.
no setteroverride
id ActionId
The node's identity across rebuilds and resolution passes.
final
isEnabled bool
Whether the node can currently be invoked or opened.
final
isInvokable bool
Whether this node carries an invocation payload.
no setter
metadata ActionMetadata
User-facing text and renderer lookup data.
final
payload → T?
The invocation value owned and interpreted by the caller.
final
placementPolicy ActionPlacementPolicy
Placement behavior used when this node is a collection root.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override