AsyncState<T>.forCell constructor
AsyncState<T>.forCell (
- FutureCell<
T> cell
Create an async state for a cell holding a Future.
-
If the Future held in
cell
is pending, an AsyncStateLoading state is returned. -
If the Future held in
cell
is complete with a value, an AsyncStateData state is returned. -
If the Future held in
cell
completed with an error, an AsyncStateError state is returned.
Implementation
factory AsyncState.forCell(FutureCell<T> cell) =>
makeState(current: cell.awaited);