PlatformWebViewWidget constructor

PlatformWebViewWidget(
  1. PlatformWebViewWidgetCreationParams params
)

Creates a new PlatformWebViewWidget

Implementation

factory PlatformWebViewWidget(PlatformWebViewWidgetCreationParams params) {
  assert(
  WebViewPlatform.instance != null,
  'A platform implementation for `webview_flutter` has not been set. Please '
      'ensure that an implementation of `WebViewPlatform` has been set to '
      '`WebViewPlatform.instance` before use. For unit testing, '
      '`WebViewPlatform.instance` can be set with your own test implementation.',
  );
  final PlatformWebViewWidget webViewWidgetDelegate =
  WebViewPlatform.instance!.createPlatformWebViewWidget(params);
  PlatformInterface.verify(webViewWidgetDelegate, _token);
  return webViewWidgetDelegate;
}