WebView constructor
const
WebView(
- String url, {
- required double aspectRatio,
- bool? autoResize,
- List<
Duration> autoResizeIntervals = const [Duration.zero, Duration(seconds: 1), Duration(seconds: 2)], - bool debuggingEnabled = false,
- bool js = true,
- bool mediaPlaybackAlwaysAllow = false,
- void onAndroidHideCustomWidget()?,
- void onAndroidShowCustomWidget(
- Widget child
- bool unsupportedWorkaroundForIssue37 = true,
- String? userAgent,
- Key? key,
Creates a web view.
Implementation
const WebView(
this.url, {
required this.aspectRatio,
bool? autoResize,
this.autoResizeIntervals = const [
Duration.zero,
Duration(seconds: 1),
Duration(seconds: 2),
],
this.debuggingEnabled = false,
this.interceptNavigationRequest,
this.js = true,
this.mediaPlaybackAlwaysAllow = false,
this.onAndroidHideCustomWidget,
this.onAndroidShowCustomWidget,
this.unsupportedWorkaroundForIssue37 = true,
this.userAgent,
super.key,
}) :
// ignore: avoid_bool_literals_in_conditional_expressions
autoResize = js ? (autoResize ?? js) : false;