setItem method
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}) =>
platform.setItem(key: key, value: value);