setAndWait static method

Future<void> setAndWait(
  1. String key,
  2. Object? value, {
  3. Duration? expireTime,
})

Like set() but waits until the value is on disk (before exit/logout). await ULocalStorage.setAndWait("done", true)

Implementation

static Future<void> setAndWait(String key, Object? value, {Duration? expireTime}) => _storeFor(key).set(key, value, ttl: expireTime);