awaited property

  1. @RecordExtensionElement(type: 'ValueCell<({type-params})>', implementation: '''return AwaitCell(arg: apply(({elements}) => ({elements}).wait, key: _CombinedAwaitCellKey(this), ));''', documentation: '''A cell that awaits the [Future] held in the cells in [this]. The returned cell is like [waitLast] with the difference that whenever the values of the cells in [this] change, accessing the value of the returned cell before the new [Future]s have completed, will throw a [PendingAsyncValueError]. **NOTE**: The returned cell must have at least one observer in order to function.''')
ValueCell<T> get awaited

A cell that awaits the Future held in this.

The returned cell is like waitLast with the difference that whenever the value of this is changed to a new Future, accessing the value of the returned cell before the new Future has completed, 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 AwaitCell(arg: apply(({elements}) => ({elements}).wait,
    key: _CombinedAwaitCellKey(this),
    ));''',

  documentation: '''A cell that awaits the [Future] held in the cells in [this].

The returned cell is like [waitLast] with the difference that whenever
the values of the cells in [this] change, accessing the value of
the returned cell before the new [Future]s have completed, will throw
a [PendingAsyncValueError].

**NOTE**: The returned cell must have at least one observer in order
to function.'''
)
ValueCell<T> get awaited => AwaitCell(arg: this);