InAppWebViewOptions constructor

InAppWebViewOptions({
  1. bool useShouldOverrideUrlLoading = false,
  2. bool useOnLoadResource = false,
  3. bool useOnDownloadStart = false,
  4. bool clearCache = false,
  5. String userAgent = "",
  6. String applicationNameForUserAgent = "",
  7. bool javaScriptEnabled = true,
  8. bool javaScriptCanOpenWindowsAutomatically = false,
  9. bool mediaPlaybackRequiresUserGesture = true,
  10. int? minimumFontSize,
  11. bool verticalScrollBarEnabled = true,
  12. bool horizontalScrollBarEnabled = true,
  13. List<String> resourceCustomSchemes = const [],
  14. List<ContentBlocker> contentBlockers = const [],
  15. UserPreferredContentMode? preferredContentMode = UserPreferredContentMode.RECOMMENDED,
  16. bool useShouldInterceptAjaxRequest = false,
  17. bool useShouldInterceptFetchRequest = false,
  18. bool incognito = false,
  19. bool cacheEnabled = true,
  20. bool transparentBackground = false,
  21. bool disableVerticalScroll = false,
  22. bool disableHorizontalScroll = false,
  23. bool disableContextMenu = false,
  24. bool supportZoom = true,
  25. bool allowFileAccessFromFileURLs = false,
  26. bool allowUniversalAccessFromFileURLs = false,
})

Implementation

InAppWebViewOptions({
  this.useShouldOverrideUrlLoading = false,
  this.useOnLoadResource = false,
  this.useOnDownloadStart = false,
  this.clearCache = false,
  this.userAgent = "",
  this.applicationNameForUserAgent = "",
  this.javaScriptEnabled = true,
  this.javaScriptCanOpenWindowsAutomatically = false,
  this.mediaPlaybackRequiresUserGesture = true,
  this.minimumFontSize,
  this.verticalScrollBarEnabled = true,
  this.horizontalScrollBarEnabled = true,
  this.resourceCustomSchemes = const [],
  this.contentBlockers = const [],
  this.preferredContentMode = UserPreferredContentMode.RECOMMENDED,
  this.useShouldInterceptAjaxRequest = false,
  this.useShouldInterceptFetchRequest = false,
  this.incognito = false,
  this.cacheEnabled = true,
  this.transparentBackground = false,
  this.disableVerticalScroll = false,
  this.disableHorizontalScroll = false,
  this.disableContextMenu = false,
  this.supportZoom = true,
  this.allowFileAccessFromFileURLs = false,
  this.allowUniversalAccessFromFileURLs = false,
}) {
  if (this.minimumFontSize == null)
    this.minimumFontSize = Util.isAndroid ? 8 : 0;
  assert(
    !this.resourceCustomSchemes.contains("http") &&
        !this.resourceCustomSchemes.contains("https"),
  );
}