AsyncSnapshotState enum

The state of connection to an asynchronous computation.

The usual flow of state is as follows:

  1. uninitialized, indicating that the asynchronous operation has not yet started for the first time.
  2. waiting, indicating that the asynchronous operation has begun.
  3. data, with data being non-null, and that computation completed.
  4. none, with data being null, and computation completed.
  5. error, with computation error.
  6. finalized, indicating that the asynchronous operation has completed and will not restart automatically.

See also:

  • FutureSnapshot, which augments a future state with information received from the asynchronous computation.
Inheritance

Constructors

AsyncSnapshotState()
const

Values

uninitialized → const AsyncSnapshotState

Connected to a uninitialized state has not yet started for the first time with initial or no data.

waiting → const AsyncSnapshotState

Connected to an asynchronous future computation and awaiting result.

data → const AsyncSnapshotState

Connected to a asynchronous computation with data.

none → const AsyncSnapshotState

Connected to an asynchronous computation with no data.

error → const AsyncSnapshotState

Connected to an asynchronous computation with an error.

finalized → const AsyncSnapshotState

Connected to a terminated asynchronous computation. Asynchronous operations's computations will not happen after this state unless restarted.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
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.
inherited

Operators

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

Constants

values → const List<AsyncSnapshotState>
A constant List of the values in this enum, in order of their declaration.