mutate method Null safety

void mutate(
  1. void setter(
    1. T
    )
)

Implementation

void mutate(void Function(T) setter) {
  setter(this._currentValue);
  value = this._currentValue;
}