FutureSnapshot<T> class

Inheritance
Annotations
  • @immutable

Constructors

FutureSnapshot.complete(T? data)
Creates an FutureSnapshot with a data. Constructed upon asynchronous task completion with data or no data.
const
FutureSnapshot.error(Object error, [StackTrace? stackTrace])
Creates an FutureSnapshot in error state.
const
FutureSnapshot.loading()
Creates an FutureSnapshot in loading state.
const
FutureSnapshot.state(AsyncSnapshotState state, {T? data, Object? error, StackTrace? stackTrace})
const

Properties

data → T?
final
error Object?
The latest error object received by the asynchronous computation.
final
hasData bool
Returns whether this snapshot contains a non-null data value.
no setterinherited
hasError bool
Returns whether this snapshot contains a non-null error value.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
isLoading bool
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stackTrace StackTrace?
The latest stack trace object received by the asynchronous computation.
final
state AsyncSnapshotState
Current state of connection to the asynchronous future computation.
final

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