InAppWebViewOptions constructor
InAppWebViewOptions({
- bool useShouldOverrideUrlLoading = false,
- bool useOnLoadResource = false,
- bool useOnDownloadStart = false,
- bool clearCache = false,
- String userAgent = "",
- String applicationNameForUserAgent = "",
- bool javaScriptEnabled = true,
- bool javaScriptCanOpenWindowsAutomatically = false,
- bool mediaPlaybackRequiresUserGesture = true,
- int? minimumFontSize,
- bool verticalScrollBarEnabled = true,
- bool horizontalScrollBarEnabled = true,
- List<
String> resourceCustomSchemes = const [], - List<
ContentBlocker> contentBlockers = const [], - UserPreferredContentMode? preferredContentMode = UserPreferredContentMode.RECOMMENDED,
- bool useShouldInterceptAjaxRequest = false,
- bool useShouldInterceptFetchRequest = false,
- bool incognito = false,
- bool cacheEnabled = true,
- bool transparentBackground = false,
- bool disableVerticalScroll = false,
- bool disableHorizontalScroll = false,
- bool disableContextMenu = false,
- bool supportZoom = true,
- bool allowFileAccessFromFileURLs = false,
- 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"));
}