AsyncSnapshotExtension<T> extension

on

Properties

isData bool

Available on AsyncSnapshot<T>, provided by the AsyncSnapshotExtension extension

Returns true if the AsyncSnapshot is in the done state and has data.
no setter
isError bool

Available on AsyncSnapshot<T>, provided by the AsyncSnapshotExtension extension

Returns true if the AsyncSnapshot is in the done state and has an error.
no setter
isIdle bool

Available on AsyncSnapshot<T>, provided by the AsyncSnapshotExtension extension

Returns true if the AsyncSnapshot is in the none state.
no setter
isLoading bool

Available on AsyncSnapshot<T>, provided by the AsyncSnapshotExtension extension

Returns the ConnectionState of the AsyncSnapshot.
no setter

Methods

maybeWhen<R>({AsyncIdleCallback<R>? idle, AsyncDataCallback<R, T>? data, AsyncErrorCallback<R>? error, AsyncLoadingCallback<R>? loading, required R orElse()}) → R

Available on AsyncSnapshot<T>, provided by the AsyncSnapshotExtension extension

when<R>({required AsyncIdleCallback<R> idle, required AsyncDataCallback<R, T> data, required AsyncErrorCallback<R> error, required AsyncLoadingCallback<R> loading}) → R

Available on AsyncSnapshot<T>, provided by the AsyncSnapshotExtension extension

whenData<R>(AsyncDataCallback<R?, T>? data) → R?

Available on AsyncSnapshot<T>, provided by the AsyncSnapshotExtension extension

whenError<R>(AsyncErrorCallback<R?>? error) → R?

Available on AsyncSnapshot<T>, provided by the AsyncSnapshotExtension extension

whenIdle<R>(AsyncIdleCallback<R?>? idle) → R?

Available on AsyncSnapshot<T>, provided by the AsyncSnapshotExtension extension

whenLoading<R>(AsyncLoadingCallback<R?>? loading) → R?

Available on AsyncSnapshot<T>, provided by the AsyncSnapshotExtension extension

whenOrNull<R>({AsyncIdleCallback<R?>? idle, AsyncDataCallback<R?, T>? data, AsyncErrorCallback<R?>? error, AsyncLoadingCallback<R?>? loading}) → R?

Available on AsyncSnapshot<T>, provided by the AsyncSnapshotExtension extension