CommandPolicy class final
Immutable execution and timing policy for an Effect Command.
The timing stage runs before kind. This keeps debounce/throttle composable with drop, latest, and queue without introducing separate Command classes.
Constructors
- CommandPolicy.drop({TriggerPolicy trigger = const TriggerPolicy.immediate()})
-
const
- CommandPolicy.latest({bool cancelPrevious = false, TriggerPolicy trigger = const TriggerPolicy.immediate()})
-
const
- CommandPolicy.queue({int? maxPending, QueueOverflow overflow = QueueOverflow.rejectNewest, TriggerPolicy trigger = const TriggerPolicy.immediate()})
-
const
Properties
- cancelPrevious → bool
-
Interrupt the previous authoritative managed execution when a newer latest
invocation is accepted.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- kind → CommandPolicyKind
-
final
- maxPending → int?
-
Maximum callers waiting behind the active queue execution.
final
- overflow → QueueOverflow
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- trigger → TriggerPolicy
-
final
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.
inherited