toUpdating method

Updating<T, E> toUpdating(
  1. T newValue, {
  2. Future<T>? future,
  3. Completer<T>? completer,
})

Transition to Updating, keeping previous context for optimistic UI.

Implementation

Updating<T, E> toUpdating(
    T newValue, {
      Future<T>? future,
      Completer<T>? completer,
    }) {
  return Updating(
    newValue,
    previous: this,
    future: future,
    completer: completer,
  );
}