PlatformWebStorage.static constructor

PlatformWebStorage.static()

Creates a new empty PlatformWebStorage to access static methods.

Implementation

factory PlatformWebStorage.static() {
  assert(
    InAppWebViewPlatform.instance != null,
    'A platform implementation for `flutter_inappwebview_forge` has not been set. Please '
    'ensure that an implementation of `InAppWebViewPlatform` has been set to '
    '`InAppWebViewPlatform.instance` before use. For unit testing, '
    '`InAppWebViewPlatform.instance` can be set with your own test implementation.',
  );
  final PlatformWebStorage webStorageStatic = InAppWebViewPlatform.instance!
      .createPlatformWebStorageStatic();
  PlatformInterface.verify(webStorageStatic, _token);
  return webStorageStatic;
}