InAppWebViewOptions constructor Null safety

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

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 =
        defaultTargetPlatform == TargetPlatform.android ? 8 : 0;
  assert(!this.resourceCustomSchemes.contains("http") &&
      !this.resourceCustomSchemes.contains("https"));
}