Sequential class
A queue that manages the execution of functions sequentially, allowing for optional throttling.
Constructors
- Sequential({Duration? buffer})
-
Creates an Sequential with an optional
buffer
for throttling execution.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasLast → bool
-
Indicates whether the last value in the queue is a Future. Use
isEmpty instead to check if the queue is empty.
no setter
- isEmpty → bool
-
Indicates whether the queue is empty or processing.
no setter
- last → FutureOr
-
Retrieves the last value in the queue without altering the queue.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
add<
T> (FutureOr< T> function(dynamic previous), {Duration? buffer}) → FutureOr<T> -
Adds a
function
to the queue that processes the previous value. Applies an optionalbuffer
duration to throttle the execution. -
addAll<
T> (Iterable< FutureOr< functions, {Duration? buffer}) → List<T> Function(dynamic previous)>FutureOr< T> > -
Adds multiple
functions
to the queue for sequential execution. See add. -
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