webStorage property

  1. @SupportedPlatforms.new(platforms: [AndroidPlatform(), IOSPlatform(), MacOSPlatform(), WebPlatform(), WindowsPlatform()])
PlatformWebStorage get webStorage

Provides access to the JavaScript Web Storage API: window.sessionStorage and window.localStorage.

Officially Supported Platforms/Implementations:

  • Android WebView
  • iOS WKWebView
  • macOS WKWebView
  • Web <iframe> but requires same origin
  • Windows WebView2

Use the PlatformInAppWebViewController.isPropertySupported method to check if this property is supported at runtime.

Implementation

@SupportedPlatforms(
  platforms: [
    AndroidPlatform(),
    IOSPlatform(),
    MacOSPlatform(),
    WebPlatform(),
    WindowsPlatform(),
  ],
)
PlatformWebStorage get webStorage => throw UnimplementedError(
  '${PlatformInAppWebViewControllerProperty.webStorage.name} is not implemented on the current platform',
);