update method

T update(
  1. T fn(
    1. T? value
    )
)

Implementation

T update(T Function(T? value) fn) => value = fn(_value);