update method

T update(
  1. T fn(
    1. T
    ), {
  2. bool force = false,
})

Implementation

T update(T Function(T) fn, {bool force = false}) {
  final v = fn(_value);

  if (force || _value != v) {
    write(v, forceUpdate: force);
  }

  return v;
}