waitLast property
- @RecordExtensionElement(type: 'ValueCell<({type-params})>', implementation: '''return WaitCell(arg: apply(({elements}) => ({elements}).wait, key: _CombinedCellKey(this, true)), lastOnly: true );''', documentation: '''A cell that awaits the [Future] held in the cells in [this]. The returned cell is like [wait] with the difference that if the values of the cells in [this] change, before the previous values have completed, the previous values are dropped. 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.''')
A cell that awaits the Future held in this
.
The returned cell is like wait with the difference that if the value of
this
changes to a new Future, before its previous value has
completed, the previous value is dropped.
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, true)),
lastOnly: true
);''',
documentation: '''A cell that awaits the [Future] held in the cells in [this].
The returned cell is like [wait] with the difference that if the values of
the cells in [this] change, before the previous values have
completed, the previous values are dropped.
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 waitLast => WaitCell(
arg: this,
lastOnly: true
);