VoidTask<TResult, TError> class

A Task that takes no parameter. Call it with task() — no null required. Created via createVoid or Store.createVoidTask.

Internally a thin subclass over Task<void, TResult, TError> that turns the required positional parameter into an optional one.

Inheritance

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state TaskState<void, TResult, TError>
Current snapshot of the task's lifecycle state.
no setterinherited

Methods

call([void params]) Future<TResult>
Invokes the task's underlying async function with params, returning the eventual TResult. Behaviour under concurrent calls depends on the TaskStrategy (see class-level docs).
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reset() → void
Returns the task to TaskIdle, cancelling pending coalesced callers and dropping state writes from any in-flight run. The underlying fn keeps running to completion — Dart has no cancellation primitive — but its outcome no longer reaches state and no longer settles callers that subscribed before the reset.
inherited
subscribe(StateChangeListener<TaskState<void, TResult, TError>> listener, {bool fireImmediately = false}) StateListenerDisposer
Registers listener for imperative observation of state transitions. Returns a disposer that detaches the listener.
inherited
toString() String
A string representation of this object.
inherited

Operators

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