waitLast property

ValueCell<(T$1, T$2)> get waitLast

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.

Implementation

ValueCell<(T$1, T$2)> get waitLast {
  return WaitCell(
      arg:
          apply(($1, $2) => ($1, $2).wait, key: _CombinedCellKey(this, true)),
      lastOnly: true);
}