asyncState property
- @RecordExtensionElement(type: 'ValueCell<AsyncState<({type-params})>>', implementation: '''return ValueCell.computed(() => AsyncState.makeState( current: awaited, ), key: _AsyncStateCellKey(this));''', documentation: '''A cell that evaluates to the [AsyncState] of the [Future] held in this cell. **NOTE**: The returned cell must have at least one observer in order to function.''')
A cell that evaluates to the AsyncState of the Future in this cell.
Implementation
@RecordExtensionElement(
type: 'ValueCell<AsyncState<({type-params})>>',
implementation: '''return ValueCell.computed(() => AsyncState.makeState(
current: awaited,
), key: _AsyncStateCellKey(this));''',
documentation: '''A cell that evaluates to the [AsyncState] of the [Future] held in this cell.
**NOTE**: The returned cell must have at least one observer in order
to function.'''
)
ValueCell<AsyncState<T>> get asyncState => ValueCell.computed(
() => AsyncState.forCell(this),
key: _AsyncStateCellKey(this)
);