setItem method

Future<void> setItem({
  1. required String key,
  2. required dynamic value,
})

When passed a key name and value, will add that key to the storage, or update that key's value if it already exists.

NOTE for Web: this method will have effect only if the iframe has the same origin.

Officially Supported Platforms/Implementations:

  • Android native WebView
  • iOS
  • MacOS
  • Web

Implementation

Future<void> setItem({required String key, required dynamic value}) {
  throw UnimplementedError(
      'setItem is not implemented on the current platform');
}