mutate method

void mutate(
  1. T newValue
)

Manually updates the local data.

This is useful for optimistic updates.

controller.mutate(optimisticData);
await controller.run();

Implementation

void mutate(T newValue) {
  if (!_canceled) {
    data.value = newValue;
  }
}