WebViewElement constructor
WebViewElement(
- dynamic context, {
- String? initialUrl,
- JavascriptMode javascriptMode = JavascriptMode.unrestricted,
- Set<
JavascriptChannel> ? javascriptChannels, - Set<
Factory< ? gestureRecognizers,OneSequenceGestureRecognizer> > - bool debuggingEnabled = false,
- String userAgent = DEFAULT_USER_AGENT,
- AutoMediaPlaybackPolicy initialMediaPlaybackPolicy = AutoMediaPlaybackPolicy.require_user_action_for_all_media_types,
Creates a new web view.
The web view can be controlled using a WebViewController
that is passed to the
onWebViewCreated
callback once the web view is created.
The javascriptMode
and autoMediaPlaybackPolicy
parameters must not be null.
Implementation
WebViewElement(
context, {
this.initialUrl,
this.javascriptMode = JavascriptMode.unrestricted,
this.javascriptChannels,
this.navigationDelegate,
this.gestureRecognizers,
this.debuggingEnabled = false,
this.gestureNavigationEnabled = false,
this.userAgent = DEFAULT_USER_AGENT,
this.initialMediaPlaybackPolicy =
AutoMediaPlaybackPolicy.require_user_action_for_all_media_types,
}) : assert(javascriptMode != null),
assert(initialMediaPlaybackPolicy != null),
super(context,
defaultStyle: _defaultStyle,
isReplacedElement: true,
isDefaultRepaintBoundary: true);