SetLargeString function

Future<void> SetLargeString(
  1. String key,
  2. String value
)

Implementation

Future<void> SetLargeString(String key, String value) {
  _validateStorageKey(key);
  _largeMemoryFallback[key] = value;

  try {
    web.window.localStorage.setItem(key, value);
  } catch (_) {
    // Some browsers can disable persistent storage. Keep the value available
    // for the lifetime of the current page as a graceful fallback.
  }

  return Future<void>.value();
}