wait property
- @RecordExtensionElement(type: 'ValueCell<({type-params})>', implementation: '''return WaitCell(arg: apply(({elements}) => ({elements}).wait, key: _CombinedCellKey(this, false) ));''', documentation: '''Return a cell that awaits the [Future] held in the cells in [this]. The value of the returned cell is the completed value of the [Future]. Whenever the values of the cells in [this] change, the returned cell awaits the new [Future] and updates its value accordingly. Until the [Future] completes, accessing the [value] of the returned cell will throw a [PendingAsyncValueError]. **NOTE**: The returned cell must have at least one observer in order to function.''')
Return a cell that awaits the Future held in this
.
The value of the returned cell is the completed value of the Future.
Whenever the value of this
changes, the returned cell awaits the
new Future and updates its value accordingly.
Until the Future completes, accessing the value of the returned cell will throw a PendingAsyncValueError.
NOTE: The returned cell must have at least one observer in order to function.
Implementation
@RecordExtensionElement(
type: 'ValueCell<({type-params})>',
implementation: '''return WaitCell(arg: apply(({elements}) => ({elements}).wait,
key: _CombinedCellKey(this, false)
));''',
documentation: '''Return a cell that awaits the [Future] held in the cells in [this].
The value of the returned cell is the completed value of the [Future].
Whenever the values of the cells in [this] change, the returned cell
awaits the new [Future] and updates its value accordingly.
Until the [Future] completes, accessing the [value] of the returned cell
will throw a [PendingAsyncValueError].
**NOTE**: The returned cell must have at least one observer in order
to function.'''
)
ValueCell<T> get wait => WaitCell(arg: this);