WebView constructor

const WebView(
  1. String url, {
  2. required double aspectRatio,
  3. bool? autoResize,
  4. List<Duration> autoResizeIntervals = const [Duration.zero, Duration(seconds: 1), Duration(seconds: 2)],
  5. bool debuggingEnabled = false,
  6. bool interceptNavigationRequest(
    1. String
    )?,
  7. bool js = true,
  8. bool mediaPlaybackAlwaysAllow = false,
  9. void onAndroidHideCustomWidget()?,
  10. void onAndroidShowCustomWidget(
    1. Widget child
    )?,
  11. bool unsupportedWorkaroundForIssue37 = true,
  12. String? userAgent,
  13. 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;