update<T> static method

Future<void> update<T>(
  1. String key,
  2. T? transform(
    1. T? current
    )
)

Changes a value based on its current value. ULocalStorage.update<int>("score", (v) => (v ?? 0) + 10)

Implementation

static Future<void> update<T>(String key, T? Function(T? current) transform) => _storeFor(key).update<T>(key, transform);