BaseAsyncState<S extends Object?>.data constructor

const BaseAsyncState<S extends Object?>.data(
  1. S? data
)

Creates a data state with the given data.

Use this when the asynchronous operation has completed successfully and you have data to provide.

Implementation

const BaseAsyncState.data(this.data)
    : errorState = null,
      _status = AsyncStatus.data;