updateAndGet method

T updateAndGet(
  1. T transform(
    1. T value
    )
)

Updates the value using the specified function of its value, and returns the new value.

Implementation

@pragma('vm:prefer-inline')
@pragma('dart2js:tryInline')
T updateAndGet(T Function(T value) transform) => value = transform(value);