delayed method

FutureCell<T> delayed(
  1. Duration delay
)

Create a cell which notifies its observers, for value changes in this, after a delay.

The returned cell takes on the same value as this, but instead of updating its value immediately when the value of this changes, it updates its value, and hence notifies its observers, after a delay.

The cell returned is a keyed cell, which is unique for a given this and delay.

Implementation

FutureCell<T> delayed(Duration delay) =>
    apply((value) => Future.delayed(delay, () => value),
      key: _DelayCellKey(this, delay)
    );