From fc98712f30e75edb3d70dbbf3fe07a77e0b0552f Mon Sep 17 00:00:00 2001 From: Lorenzo Pichilli Date: Wed, 30 Nov 2022 16:53:10 +0100 Subject: [PATCH] Updated code docs, Fixed some missing macOS asserts, fix #1447 --- CHANGELOG.md | 10 + .../InAppWebViewChromeClient.java | 2 +- dev_packages/generators/lib/src/util.dart | 8 +- .../chrome_safari_browser/open_and_close.dart | 2 +- example/ios/Runner.xcodeproj/project.pbxproj | 8 +- .../chrome_safari_browser.dart | 2 +- .../chrome_safari_browser_settings.dart | 6 +- lib/src/context_menu.dart | 7 +- lib/src/cookie_manager.dart | 8 +- lib/src/in_app_browser/in_app_browser.dart | 2 +- .../in_app_browser_settings.dart | 8 +- lib/src/in_app_webview/in_app_webview.dart | 8 +- .../in_app_webview_controller.dart | 33 +- .../in_app_webview_settings.dart | 1485 ++++++++++------- .../in_app_webview_settings.g.dart | 424 ++--- lib/src/in_app_webview/webview.dart | 2 +- lib/src/types/client_cert_response.dart | 4 +- lib/src/types/client_cert_response.g.dart | 3 +- lib/src/types/create_window_action.dart | 4 + lib/src/types/create_window_action.g.dart | 1 + lib/src/types/js_alert_request.dart | 2 +- lib/src/types/js_alert_request.g.dart | 1 + lib/src/types/js_confirm_request.dart | 2 +- lib/src/types/js_confirm_request.g.dart | 1 + lib/src/types/js_prompt_request.dart | 2 +- lib/src/types/js_prompt_request.g.dart | 1 + lib/src/types/navigation_action.dart | 17 + lib/src/types/navigation_action.g.dart | 4 + lib/src/types/ssl_certificate.dart | 3 +- lib/src/types/ssl_certificate.g.dart | 2 +- lib/src/types/url_credential.dart | 4 +- lib/src/types/url_credential.g.dart | 2 + lib/src/types/url_protection_space.dart | 16 + lib/src/types/url_protection_space.g.dart | 4 + lib/src/types/url_request.dart | 48 + lib/src/types/url_request.g.dart | 11 + lib/src/types/web_resource_error_type.dart | 24 - lib/src/types/web_resource_error_type.g.dart | 24 - lib/src/util.dart | 24 +- .../web_authenticate_session.dart | 3 +- pubspec.yaml | 2 +- 41 files changed, 1226 insertions(+), 998 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f7b4252d..77ca8556 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.0.0-beta.19 + +- Updated code docs +- Fixed "Cannot Grant Permission at Android 21" [#1447](https://github.com/pichillilorenzo/flutter_inappwebview/issues/1447) +- Fixed some missing macOS asserts + ## 6.0.0-beta.18 - Fixed `InAppWebViewSettings` automatic infer if `initialSettings` is `null` @@ -158,6 +164,10 @@ - Removed `URLProtectionSpace.iosIsProxy` property - `historyUrl` and `baseUrl` of `InAppWebViewInitialData` can be `null` +## 5.7.2+1 + +- Fixed "Cannot Grant Permission at Android 21" [#1447](https://github.com/pichillilorenzo/flutter_inappwebview/issues/1447) + ## 5.7.2 - Removed Android Hybrid Composition constraint to use the pull-to-refresh feature diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/InAppWebViewChromeClient.java b/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/InAppWebViewChromeClient.java index ff629268..5834cebd 100755 --- a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/InAppWebViewChromeClient.java +++ b/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/InAppWebViewChromeClient.java @@ -1211,7 +1211,7 @@ public class InAppWebViewChromeClient extends WebChromeClient implements PluginR @Override public void onPermissionRequest(final PermissionRequest request) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { final WebViewChannelDelegate.PermissionRequestCallback callback = new WebViewChannelDelegate.PermissionRequestCallback() { @Override public boolean nonNullSuccess(@NonNull PermissionResponse response) { diff --git a/dev_packages/generators/lib/src/util.dart b/dev_packages/generators/lib/src/util.dart index d30c33bb..5b3d2230 100644 --- a/dev_packages/generators/lib/src/util.dart +++ b/dev_packages/generators/lib/src/util.dart @@ -34,7 +34,13 @@ abstract class Util { final platformName = platform.getField("name")!.toStringValue(); final note = platform.getField("note")?.toStringValue(); if (note != null) { - platformNoteList.add("///**NOTE for $platformName**: $note"); + final noteLines = note.split("\n"); + var platformNote = + "///**NOTE for $platformName**: ${noteLines[0].trim()}"; + for (int i = 1; i < noteLines.length; i++) { + platformNote += "\n///${noteLines[i].trim()}"; + } + platformNoteList.add(platformNote); } final apiName = platform.getField("apiName")?.toStringValue(); diff --git a/example/integration_test/chrome_safari_browser/open_and_close.dart b/example/integration_test/chrome_safari_browser/open_and_close.dart index a9979b17..5b5a4d9e 100644 --- a/example/integration_test/chrome_safari_browser/open_and_close.dart +++ b/example/integration_test/chrome_safari_browser/open_and_close.dart @@ -45,7 +45,7 @@ void openAndClose() { activityButton: ActivityButton( templateImage: UIImage(systemName: "sun.max"), extensionIdentifier: - "com.pichillilorenzo.flutter-inappwebview-6-Example.test"))); + "com.pichillilorenzo.flutter-inappwebview6-example.test"))); await chromeSafariBrowser.opened.future; expect(chromeSafariBrowser.isOpened(), true); expect(() async { diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index a1d0a209..52e55bba 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -451,7 +451,7 @@ MARKETING_VERSION = 1.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = "com.pichillilorenzo.flutter-inappwebview-6-Example.test"; + PRODUCT_BUNDLE_IDENTIFIER = "com.pichillilorenzo.flutter-inappwebview6-example.test"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; @@ -484,7 +484,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; MARKETING_VERSION = 1.0; MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = "com.pichillilorenzo.flutter-inappwebview-6-Example.test"; + PRODUCT_BUNDLE_IDENTIFIER = "com.pichillilorenzo.flutter-inappwebview6-example.test"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_EMIT_LOC_STRINGS = YES; @@ -627,7 +627,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - PRODUCT_BUNDLE_IDENTIFIER = "com.pichillilorenzo.flutter-inappwebview-6-Example"; + PRODUCT_BUNDLE_IDENTIFIER = "com.pichillilorenzo.flutter-inappwebview6-example"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -659,7 +659,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - PRODUCT_BUNDLE_IDENTIFIER = "com.pichillilorenzo.flutter-inappwebview-6-Example"; + PRODUCT_BUNDLE_IDENTIFIER = "com.pichillilorenzo.flutter-inappwebview6-example"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; diff --git a/lib/src/chrome_safari_browser/chrome_safari_browser.dart b/lib/src/chrome_safari_browser/chrome_safari_browser.dart index 2ee4a0d2..720fb58b 100755 --- a/lib/src/chrome_safari_browser/chrome_safari_browser.dart +++ b/lib/src/chrome_safari_browser/chrome_safari_browser.dart @@ -208,7 +208,7 @@ class ChromeSafariBrowser { // ignore: deprecated_member_use_from_same_package ChromeSafariBrowserClassOptions? options, ChromeSafariBrowserSettings? settings}) async { - if (!kIsWeb && defaultTargetPlatform == TargetPlatform.iOS) { + if (Util.isIOS) { assert(url != null, 'The specified URL must not be null on iOS.'); assert(['http', 'https'].contains(url!.scheme), 'The specified URL has an unsupported scheme. Only HTTP and HTTPS URLs are supported on iOS.'); diff --git a/lib/src/chrome_safari_browser/chrome_safari_browser_settings.dart b/lib/src/chrome_safari_browser/chrome_safari_browser_settings.dart index 12e2ed42..a828546c 100755 --- a/lib/src/chrome_safari_browser/chrome_safari_browser_settings.dart +++ b/lib/src/chrome_safari_browser/chrome_safari_browser_settings.dart @@ -1,6 +1,5 @@ import 'dart:ui'; -import 'package:flutter/foundation.dart'; import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; import '../types/activity_button.dart'; @@ -341,10 +340,9 @@ class ChromeSafariBrowserClassOptions { Map toMap() { Map options = {}; - if (defaultTargetPlatform == TargetPlatform.android) + if (Util.isAndroid) options.addAll(this.android?.toMap() ?? {}); - else if (defaultTargetPlatform == TargetPlatform.iOS) - options.addAll(this.ios?.toMap() ?? {}); + else if (Util.isIOS) options.addAll(this.ios?.toMap() ?? {}); return options; } diff --git a/lib/src/context_menu.dart b/lib/src/context_menu.dart index 4d1f6286..0d713ca1 100644 --- a/lib/src/context_menu.dart +++ b/lib/src/context_menu.dart @@ -1,7 +1,6 @@ -import 'package:flutter/foundation.dart'; - import 'in_app_webview/webview.dart'; import 'types/main.dart'; +import 'util.dart'; ///Class that represents the WebView context menu. It used by [WebView.contextMenu]. /// @@ -89,11 +88,11 @@ class ContextMenuItem { @Deprecated("Use id instead") this.iosId, required this.title, this.action}) { - if (defaultTargetPlatform == TargetPlatform.android) { + if (Util.isAndroid) { // ignore: deprecated_member_use_from_same_package this.id = this.id ?? this.androidId; assert(this.id is int); - } else if (defaultTargetPlatform == TargetPlatform.iOS) { + } else if (Util.isIOS) { // ignore: deprecated_member_use_from_same_package this.id = this.id ?? this.iosId; } diff --git a/lib/src/cookie_manager.dart b/lib/src/cookie_manager.dart index beab653b..d4f2ba39 100755 --- a/lib/src/cookie_manager.dart +++ b/lib/src/cookie_manager.dart @@ -8,6 +8,7 @@ import 'in_app_webview/headless_in_app_webview.dart'; import 'platform_util.dart'; import 'types/main.dart'; +import 'util.dart'; import 'web_uri.dart'; ///Class that implements a singleton object (shared instance) which manages the cookies used by WebView instances. @@ -519,14 +520,13 @@ class CookieManager { } Future _shouldUseJavascript() async { - if (kIsWeb) { + if (Util.isWeb) { return true; } - if (defaultTargetPlatform == TargetPlatform.iOS || - defaultTargetPlatform == TargetPlatform.macOS) { + if (Util.isIOS || Util.isMacOS) { final platformUtil = PlatformUtil.instance(); final systemVersion = await platformUtil.getSystemVersion(); - return defaultTargetPlatform == TargetPlatform.iOS + return Util.isIOS ? systemVersion.compareTo("11") == -1 : systemVersion.compareTo("10.13") == -1; } diff --git a/lib/src/in_app_browser/in_app_browser.dart b/lib/src/in_app_browser/in_app_browser.dart index 47c69080..3fd65997 100755 --- a/lib/src/in_app_browser/in_app_browser.dart +++ b/lib/src/in_app_browser/in_app_browser.dart @@ -972,7 +972,7 @@ class InAppBrowser { ///[permissionRequest] represents the permission request with an array of resources the web content wants to access ///and the origin of the web page which is trying to access the restricted resources. /// - ///**NOTE for Android**: available only on Android 23+. + ///**NOTE for Android**: available only on Android 21+. /// ///**NOTE for iOS**: available only on iOS 15.0+. The default [PermissionResponse.action] is [PermissionResponseAction.PROMPT]. /// diff --git a/lib/src/in_app_browser/in_app_browser_settings.dart b/lib/src/in_app_browser/in_app_browser_settings.dart index 57cb6dcc..68c5d53e 100755 --- a/lib/src/in_app_browser/in_app_browser_settings.dart +++ b/lib/src/in_app_browser/in_app_browser_settings.dart @@ -350,10 +350,10 @@ class InAppBrowserClassOptions { options.addAll(this.crossPlatform.toMap()); options.addAll(this.inAppWebViewGroupOptions.crossPlatform.toMap()); - if (defaultTargetPlatform == TargetPlatform.android) { + if (Util.isAndroid) { options.addAll(this.android.toMap()); options.addAll(this.inAppWebViewGroupOptions.android.toMap()); - } else if (defaultTargetPlatform == TargetPlatform.iOS) { + } else if (Util.isIOS) { options.addAll(this.ios.toMap()); options.addAll(this.inAppWebViewGroupOptions.ios.toMap()); } @@ -380,12 +380,12 @@ class InAppBrowserClassOptions { InAppWebViewGroupOptions(); inAppBrowserClassOptions.inAppWebViewGroupOptions.crossPlatform = InAppWebViewOptions.fromMap(options); - if (defaultTargetPlatform == TargetPlatform.android) { + if (Util.isAndroid) { inAppBrowserClassOptions.android = AndroidInAppBrowserOptions.fromMap(options); inAppBrowserClassOptions.inAppWebViewGroupOptions.android = AndroidInAppWebViewOptions.fromMap(options); - } else if (defaultTargetPlatform == TargetPlatform.iOS) { + } else if (Util.isIOS) { inAppBrowserClassOptions.ios = IOSInAppBrowserOptions.fromMap(options); inAppBrowserClassOptions.inAppWebViewGroupOptions.ios = IOSInAppWebViewOptions.fromMap(options); diff --git a/lib/src/in_app_webview/in_app_webview.dart b/lib/src/in_app_webview/in_app_webview.dart index 83cb6edb..e42efcc1 100755 --- a/lib/src/in_app_webview/in_app_webview.dart +++ b/lib/src/in_app_webview/in_app_webview.dart @@ -639,7 +639,7 @@ class _InAppWebViewState extends State { widget.pullToRefreshController?.options.toMap() ?? PullToRefreshSettings(enabled: false).toMap(); - if (kIsWeb) { + if (Util.isWeb) { return HtmlElementView( viewType: 'com.pichillilorenzo/flutter_inappwebview', onPlatformViewCreated: (int viewId) { @@ -659,7 +659,7 @@ class _InAppWebViewState extends State { _onPlatformViewCreated(viewId); }, ); - } else if (defaultTargetPlatform == TargetPlatform.android) { + } else if (Util.isAndroid) { var useHybridComposition = (widget.initialSettings != null ? initialSettings.useHybridComposition : @@ -710,9 +710,7 @@ class _InAppWebViewState extends State { ..create(); }, ); - } else if (defaultTargetPlatform == - TargetPlatform - .iOS /* || defaultTargetPlatform == TargetPlatform.macOS*/) { + } else if (Util.isIOS /* || Util.isMacOS*/) { return UiKitView( viewType: 'com.pichillilorenzo/flutter_inappwebview', onPlatformViewCreated: _onPlatformViewCreated, diff --git a/lib/src/in_app_webview/in_app_webview_controller.dart b/lib/src/in_app_webview/in_app_webview_controller.dart index 23a0e213..50703aab 100644 --- a/lib/src/in_app_webview/in_app_webview_controller.dart +++ b/lib/src/in_app_webview/in_app_webview_controller.dart @@ -1976,8 +1976,7 @@ class InAppWebViewController { args.putIfAbsent('source', () => source); args.putIfAbsent('contentWorld', () => contentWorld?.toMap()); var data = await _channel.invokeMethod('evaluateJavascript', args); - if (data != null && - (defaultTargetPlatform == TargetPlatform.android || kIsWeb)) { + if (data != null && (Util.isAndroid || Util.isWeb)) { try { // try to json decode the data coming from JavaScript // otherwise return it as it is. @@ -2497,10 +2496,8 @@ class InAppWebViewController { {required double zoomFactor, @Deprecated('Use animated instead') bool? iosAnimated, bool animated = false}) async { - assert(defaultTargetPlatform != TargetPlatform.android || - (defaultTargetPlatform == TargetPlatform.android && - zoomFactor > 0.01 && - zoomFactor <= 100.0)); + assert(!Util.isAndroid || + (Util.isAndroid && zoomFactor > 0.01 && zoomFactor <= 100.0)); Map args = {}; args.putIfAbsent('zoomFactor', () => zoomFactor); @@ -2819,8 +2816,7 @@ class InAppWebViewController { ///- iOS ([Official API - WKUserContentController.addUserScript](https://developer.apple.com/documentation/webkit/wkusercontentcontroller/1537448-adduserscript)) ///- MacOS ([Official API - WKUserContentController.addUserScript](https://developer.apple.com/documentation/webkit/wkusercontentcontroller/1537448-adduserscript)) Future addUserScript({required UserScript userScript}) async { - assert(_webview?.windowId == null || - defaultTargetPlatform != TargetPlatform.iOS); + assert(_webview?.windowId == null || (!Util.isIOS && !Util.isMacOS)); Map args = {}; args.putIfAbsent('userScript', () => userScript.toMap()); @@ -2842,8 +2838,7 @@ class InAppWebViewController { ///- iOS ///- MacOS Future addUserScripts({required List userScripts}) async { - assert(_webview?.windowId == null || - defaultTargetPlatform != TargetPlatform.iOS); + assert(_webview?.windowId == null || (!Util.isIOS && !Util.isMacOS)); for (var i = 0; i < userScripts.length; i++) { await addUserScript(userScript: userScripts[i]); @@ -2863,8 +2858,7 @@ class InAppWebViewController { ///- iOS ///- MacOS Future removeUserScript({required UserScript userScript}) async { - assert(_webview?.windowId == null || - defaultTargetPlatform != TargetPlatform.iOS); + assert(_webview?.windowId == null || (!Util.isIOS && !Util.isMacOS)); var index = _userScripts[userScript.injectionTime]?.indexOf(userScript); if (index == null || index == -1) { @@ -2892,8 +2886,7 @@ class InAppWebViewController { ///- iOS ///- MacOS Future removeUserScriptsByGroupName({required String groupName}) async { - assert(_webview?.windowId == null || - defaultTargetPlatform != TargetPlatform.iOS); + assert(_webview?.windowId == null || (!Util.isIOS && !Util.isMacOS)); final List userScriptsAtDocumentStart = List.from( _userScripts[UserScriptInjectionTime.AT_DOCUMENT_START] ?? []); @@ -2929,8 +2922,7 @@ class InAppWebViewController { ///- MacOS Future removeUserScripts( {required List userScripts}) async { - assert(_webview?.windowId == null || - defaultTargetPlatform != TargetPlatform.iOS); + assert(_webview?.windowId == null || (!Util.isIOS && !Util.isMacOS)); for (final userScript in userScripts) { await removeUserScript(userScript: userScript); @@ -2948,8 +2940,7 @@ class InAppWebViewController { ///- iOS ([Official API - WKUserContentController.removeAllUserScripts](https://developer.apple.com/documentation/webkit/wkusercontentcontroller/1536540-removealluserscripts)) ///- MacOS ([Official API - WKUserContentController.removeAllUserScripts](https://developer.apple.com/documentation/webkit/wkusercontentcontroller/1536540-removealluserscripts)) Future removeAllUserScripts() async { - assert(_webview?.windowId == null || - defaultTargetPlatform != TargetPlatform.iOS); + assert(_webview?.windowId == null || (!Util.isIOS && !Util.isMacOS)); _userScripts[UserScriptInjectionTime.AT_DOCUMENT_START]?.clear(); _userScripts[UserScriptInjectionTime.AT_DOCUMENT_END]?.clear(); @@ -3003,7 +2994,7 @@ class InAppWebViewController { if (data == null) { return null; } - if (defaultTargetPlatform == TargetPlatform.android) { + if (Util.isAndroid) { data = json.decode(data); } return CallAsyncJavaScriptResult( @@ -3031,9 +3022,9 @@ class InAppWebViewController { Future saveWebArchive( {required String filePath, bool autoname = false}) async { if (!autoname) { - if (defaultTargetPlatform == TargetPlatform.android) { + if (Util.isAndroid) { assert(filePath.endsWith("." + WebArchiveFormat.MHT.toNativeValue())); - } else if (defaultTargetPlatform == TargetPlatform.iOS) { + } else if (Util.isIOS || Util.isMacOS) { assert(filePath .endsWith("." + WebArchiveFormat.WEBARCHIVE.toNativeValue())); } diff --git a/lib/src/in_app_webview/in_app_webview_settings.dart b/lib/src/in_app_webview/in_app_webview_settings.dart index 91fabfa9..a0c4eb30 100755 --- a/lib/src/in_app_webview/in_app_webview_settings.dart +++ b/lib/src/in_app_webview/in_app_webview_settings.dart @@ -57,11 +57,8 @@ class InAppWebViewSettings_ { ///If the [WebView.shouldOverrideUrlLoading] event is implemented and this value is `null`, ///it will be automatically inferred as `true`, otherwise, the default value is `false`. ///This logic will not be applied for [InAppBrowser], where you must set the value manually. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView - ///- iOS - ///- MacOS + @SupportedPlatforms( + platforms: [AndroidPlatform(), IOSPlatform(), MacOSPlatform()]) bool? useShouldOverrideUrlLoading; ///Set to `true` to be able to listen at the [WebView.onLoadResource] event. @@ -69,11 +66,8 @@ class InAppWebViewSettings_ { ///If the [WebView.onLoadResource] event is implemented and this value is `null`, ///it will be automatically inferred as `true`, otherwise, the default value is `false`. ///This logic will not be applied for [InAppBrowser], where you must set the value manually. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView - ///- iOS - ///- MacOS + @SupportedPlatforms( + platforms: [AndroidPlatform(), IOSPlatform(), MacOSPlatform()]) bool? useOnLoadResource; ///Set to `true` to be able to listen at the [WebView.onDownloadStartRequest] event. @@ -81,138 +75,182 @@ class InAppWebViewSettings_ { ///If the [WebView.onDownloadStartRequest] event is implemented and this value is `null`, ///it will be automatically inferred as `true`, otherwise, the default value is `false`. ///This logic will not be applied for [InAppBrowser], where you must set the value manually. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView - ///- iOS - ///- MacOS + @SupportedPlatforms( + platforms: [AndroidPlatform(), IOSPlatform(), MacOSPlatform()]) bool? useOnDownloadStart; ///Set to `true` to have all the browser's cache cleared before the new WebView is opened. The default value is `false`. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView - ///- iOS - ///- MacOS + @SupportedPlatforms( + platforms: [AndroidPlatform(), IOSPlatform(), MacOSPlatform()]) bool? clearCache; ///Sets the user-agent for the WebView. - /// - ///**NOTE**: available on iOS 9.0+. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView - ///- iOS - ///- MacOS + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebSettings.setUserAgentString", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setUserAgentString(java.lang.String)"), + IOSPlatform( + apiName: "WKWebView.customUserAgent", + apiUrl: + "https://developer.apple.com/documentation/webkit/wkwebview/1414950-customuseragent"), + MacOSPlatform( + apiName: "WKWebView.customUserAgent", + apiUrl: + "https://developer.apple.com/documentation/webkit/wkwebview/1414950-customuseragent") + ]) String? userAgent; ///Append to the existing user-agent. Setting userAgent will override this. - /// - ///**NOTE**: available on Android 17+ and on iOS 9.0+. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView - ///- iOS - ///- MacOS + @SupportedPlatforms(platforms: [ + AndroidPlatform(), + IOSPlatform( + apiName: "WKWebViewConfiguration.applicationNameForUserAgent", + apiUrl: + "https://developer.apple.com/documentation/webkit/wkwebviewconfiguration/1395665-applicationnameforuseragent"), + MacOSPlatform( + apiName: "WKWebViewConfiguration.applicationNameForUserAgent", + apiUrl: + "https://developer.apple.com/documentation/webkit/wkwebviewconfiguration/1395665-applicationnameforuseragent") + ]) String? applicationNameForUserAgent; ///Set to `true` to enable JavaScript. The default value is `true`. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView - ///- iOS - ///- Web - ///- MacOS + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebSettings.setJavaScriptEnabled", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setJavaScriptEnabled(boolean)"), + IOSPlatform( + apiName: "WKWebpagePreferences.allowsContentJavaScript", + apiUrl: + "https://developer.apple.com/documentation/webkit/wkwebpagepreferences/3552422-allowscontentjavascript/"), + MacOSPlatform( + apiName: "WKWebpagePreferences.allowsContentJavaScript", + apiUrl: + "https://developer.apple.com/documentation/webkit/wkwebpagepreferences/3552422-allowscontentjavascript/"), + WebPlatform(requiresSameOrigin: false) + ]) bool? javaScriptEnabled; ///Set to `true` to allow JavaScript open windows without user interaction. The default value is `false`. - /// - ///**NOTE for Web**: this setting will have effect only if the iframe has the same origin. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView - ///- iOS - ///- Web - ///- MacOS + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebSettings.setJavaScriptCanOpenWindowsAutomatically", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setJavaScriptCanOpenWindowsAutomatically(boolean)"), + IOSPlatform( + apiName: "WKPreferences.javaScriptCanOpenWindowsAutomatically", + apiUrl: + "https://developer.apple.com/documentation/webkit/wkpreferences/1536573-javascriptcanopenwindowsautomati/"), + MacOSPlatform( + apiName: "WKPreferences.javaScriptCanOpenWindowsAutomatically", + apiUrl: + "https://developer.apple.com/documentation/webkit/wkpreferences/1536573-javascriptcanopenwindowsautomati/"), + WebPlatform() + ]) bool? javaScriptCanOpenWindowsAutomatically; ///Set to `true` to prevent HTML5 audio or video from autoplaying. The default value is `true`. - /// - ///**NOTE for iOS**: available on iOS 10.0+. - /// - ///**NOTE for MacOS**: available on MacOS 10.12+. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView - ///- iOS - ///- MacOS + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebSettings.setMediaPlaybackRequiresUserGesture", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setMediaPlaybackRequiresUserGesture(boolean)"), + IOSPlatform( + apiName: + "WKWebViewConfiguration.mediaTypesRequiringUserActionForPlayback", + apiUrl: + "https://developer.apple.com/documentation/webkit/wkwebviewconfiguration/1851524-mediatypesrequiringuseractionfor"), + MacOSPlatform( + available: "10.12", + apiName: + "WKWebViewConfiguration.mediaTypesRequiringUserActionForPlayback", + apiUrl: + "https://developer.apple.com/documentation/webkit/wkwebviewconfiguration/1851524-mediatypesrequiringuseractionfor") + ]) bool? mediaPlaybackRequiresUserGesture; ///Sets the minimum font size. The default value is `8` for Android, `0` for iOS. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView - ///- iOS - ///- MacOS + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebSettings.setMinimumFontSize", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setMinimumFontSize(int)"), + IOSPlatform( + apiName: "WKPreferences.minimumFontSize", + apiUrl: + "https://developer.apple.com/documentation/webkit/wkpreferences/1537155-minimumfontsize/"), + MacOSPlatform( + apiName: "WKPreferences.minimumFontSize", + apiUrl: + "https://developer.apple.com/documentation/webkit/wkpreferences/1537155-minimumfontsize/") + ]) int? minimumFontSize; ///Define whether the vertical scrollbar should be drawn or not. The default value is `true`. - /// - ///**NOTE for Web**: this setting will have effect only if the iframe has the same origin. - ///It must have the same value of [horizontalScrollBarEnabled] to take effect. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView - ///- iOS - ///- Web + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "View.setVerticalScrollBarEnabled", + apiUrl: + "https://developer.android.com/reference/android/view/View#setVerticalScrollBarEnabled(boolean)"), + IOSPlatform( + apiName: "UIScrollView.showsVerticalScrollIndicator", + apiUrl: + "https://developer.apple.com/documentation/uikit/uiscrollview/1619405-showsverticalscrollindicator/"), + WebPlatform( + note: + "It must have the same value of [horizontalScrollBarEnabled] to take effect.") + ]) bool? verticalScrollBarEnabled; ///Define whether the horizontal scrollbar should be drawn or not. The default value is `true`. - /// - ///**NOTE for Web**: this setting will have effect only if the iframe has the same origin. - ///It must have the same value of [verticalScrollBarEnabled] to take effect. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView - ///- iOS - ///- Web + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "View.setHorizontalScrollBarEnabled", + apiUrl: + "https://developer.android.com/reference/android/view/View#setHorizontalScrollBarEnabled(boolean)"), + IOSPlatform( + apiName: "UIScrollView.showsHorizontalScrollIndicator", + apiUrl: + "https://developer.apple.com/documentation/uikit/uiscrollview/1619380-showshorizontalscrollindicator"), + WebPlatform( + note: + "It must have the same value of [verticalScrollBarEnabled] to take effect.") + ]) bool? horizontalScrollBarEnabled; ///List of custom schemes that the WebView must handle. Use the [WebView.onLoadResourceWithCustomScheme] event to intercept resource requests with custom scheme. - /// - ///**NOTE for iOS**: available on iOS 11.0+. - /// - ///**NOTE for MacOS**: available on MacOS 10.13+. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView - ///- iOS - ///- MacOS + @SupportedPlatforms(platforms: [ + AndroidPlatform(), + IOSPlatform(available: "11.0"), + MacOSPlatform(available: "10.13") + ]) List? resourceCustomSchemes; ///List of [ContentBlocker] that are a set of rules used to block content in the browser window. - /// - ///**NOTE for iOS**: available on iOS 11.0+. - /// - ///**NOTE for MacOS**: available on MacOS 10.13+. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView - ///- iOS - ///- MacOS + @SupportedPlatforms(platforms: [ + AndroidPlatform(), + IOSPlatform(available: "11.0"), + MacOSPlatform(available: "10.13") + ]) @ExchangeableObjectProperty(deserializer: _deserializeContentBlockers) List? contentBlockers; ///Sets the content mode that the WebView needs to use when loading and rendering a webpage. The default value is [UserPreferredContentMode.RECOMMENDED]. - /// - ///**NOTE for iOS**: available on iOS 13.0+. - /// - ///**NOTE for MacOS**: available on MacOS 10.15+. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView - ///- iOS - ///- MacOS + @SupportedPlatforms(platforms: [ + AndroidPlatform(), + IOSPlatform( + available: "13.0", + apiName: "WKWebpagePreferences.preferredContentMode", + apiUrl: + "https://developer.apple.com/documentation/webkit/wkwebpagepreferences/3194426-preferredcontentmode/"), + MacOSPlatform( + available: "10.15", + apiName: "WKWebpagePreferences.preferredContentMode", + apiUrl: + "https://developer.apple.com/documentation/webkit/wkwebpagepreferences/3194426-preferredcontentmode/") + ]) UserPreferredContentMode_? preferredContentMode; ///Set to `true` to be able to listen at the [WebView.shouldInterceptAjaxRequest] event. @@ -220,11 +258,8 @@ class InAppWebViewSettings_ { ///If the [WebView.shouldInterceptAjaxRequest] event is implemented and this value is `null`, ///it will be automatically inferred as `true`, otherwise, the default value is `false`. ///This logic will not be applied for [InAppBrowser], where you must set the value manually. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView - ///- iOS - ///- MacOS + @SupportedPlatforms( + platforms: [AndroidPlatform(), IOSPlatform(), MacOSPlatform()]) bool? useShouldInterceptAjaxRequest; ///Set to `true` to be able to listen at the [WebView.shouldInterceptFetchRequest] event. @@ -232,82 +267,58 @@ class InAppWebViewSettings_ { ///If the [WebView.shouldInterceptFetchRequest] event is implemented and this value is `null`, ///it will be automatically inferred as `true`, otherwise, the default value is `false`. ///This logic will not be applied for [InAppBrowser], where you must set the value manually. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView - ///- iOS - ///- MacOS + @SupportedPlatforms( + platforms: [AndroidPlatform(), IOSPlatform(), MacOSPlatform()]) bool? useShouldInterceptFetchRequest; ///Set to `true` to open a browser window with incognito mode. The default value is `false`. - /// - ///**NOTE for iOS**: available on iOS 9.0+. - /// - ///**NOTE for Android**: setting this to `true`, it will clear all the cookies of all WebView instances, - ///because there isn't any way to make the website data store non-persistent for the specific WebView instance such as on iOS. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView - ///- iOS - ///- MacOS + @SupportedPlatforms(platforms: [ + AndroidPlatform( + note: + """setting this to `true`, it will clear all the cookies of all WebView instances, +because there isn't any way to make the website data store non-persistent for the specific WebView instance such as on iOS."""), + IOSPlatform(), + MacOSPlatform() + ]) bool? incognito; ///Sets whether WebView should use browser caching. The default value is `true`. - /// - ///**NOTE for iOS**: available on iOS 9.0+. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView - ///- iOS - ///- MacOS + @SupportedPlatforms( + platforms: [AndroidPlatform(), IOSPlatform(), MacOSPlatform()]) bool? cacheEnabled; ///Set to `true` to make the background of the WebView transparent. If your app has a dark theme, this can prevent a white flash on initialization. The default value is `false`. - /// - ///**NOTE for MacOS**: available on MacOS 12.0+. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView - ///- iOS - ///- MacOS + @SupportedPlatforms(platforms: [ + AndroidPlatform(), + IOSPlatform(), + MacOSPlatform(available: "12.0") + ]) bool? transparentBackground; ///Set to `true` to disable vertical scroll. The default value is `false`. - /// - ///**NOTE for Web**: this setting will have effect only if the iframe has the same origin. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView - ///- iOS - ///- Web + @SupportedPlatforms( + platforms: [AndroidPlatform(), IOSPlatform(), WebPlatform()]) bool? disableVerticalScroll; ///Set to `true` to disable horizontal scroll. The default value is `false`. - /// - ///**NOTE for Web**: this setting will have effect only if the iframe has the same origin. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView - ///- iOS - ///- Web + @SupportedPlatforms( + platforms: [AndroidPlatform(), IOSPlatform(), WebPlatform()]) bool? disableHorizontalScroll; ///Set to `true` to disable context menu. The default value is `false`. - /// - ///**NOTE for Web**: this setting will have effect only if the iframe has the same origin. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView - ///- iOS - ///- Web + @SupportedPlatforms( + platforms: [AndroidPlatform(), IOSPlatform(), WebPlatform()]) bool? disableContextMenu; ///Set to `false` if the WebView should not support zooming using its on-screen zoom controls and gestures. The default value is `true`. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView - ///- iOS - ///- MacOS + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebSettings.setSupportZoom", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setSupportZoom(boolean)"), + IOSPlatform(), + MacOSPlatform() + ]) bool? supportZoom; ///Sets whether cross-origin requests in the context of a file scheme URL should be allowed to access content from other file scheme URLs. @@ -319,11 +330,14 @@ class InAppWebViewSettings_ { ///Note that the value of this setting is ignored if the value of [allowUniversalAccessFromFileURLs] is `true`. /// ///The default value is `false`. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView - ///- iOS - ///- MacOS + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebSettings.setAllowFileAccessFromFileURLs", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setAllowFileAccessFromFileURLs(boolean)"), + IOSPlatform(), + MacOSPlatform() + ]) bool? allowFileAccessFromFileURLs; ///Sets whether cross-origin requests in the context of a file scheme URL should be allowed to access content from any origin. @@ -335,11 +349,14 @@ class InAppWebViewSettings_ { ///either accessing arbitrary local files including WebView cookies, app private data or even credentials used on arbitrary web sites. /// ///The default value is `false`. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView - ///- iOS - ///- MacOS + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebSettings.setAllowUniversalAccessFromFileURLs", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setAllowUniversalAccessFromFileURLs(boolean)"), + IOSPlatform(), + MacOSPlatform() + ]) bool? allowUniversalAccessFromFileURLs; ///Set to `true` to allow audio playing when the app goes in background or the screen is locked or another app is opened. @@ -349,212 +366,288 @@ class InAppWebViewSettings_ { /// ///**IMPORTANT NOTE**: if you use this setting, your app could be rejected by the Google Play Store. ///For example, if you allow background playing of YouTube videos, which is a violation of the YouTube API Terms of Service. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [AndroidPlatform()]) bool? allowBackgroundAudioPlaying; ///Use a [WebViewAssetLoader] instance to load local files including application's static assets and resources using http(s):// URLs. ///Loading local files using web-like URLs instead of `file://` is desirable as it is compatible with the Same-Origin policy. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [AndroidPlatform()]) WebViewAssetLoader_? webViewAssetLoader; ///Sets the text zoom of the page in percent. The default value is `100`. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebSettings.setTextZoom", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setTextZoom(int)") + ]) int? textZoom; ///Set to `true` to have the session cookie cache cleared before the new window is opened. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [AndroidPlatform()]) bool? clearSessionCache; ///Set to `true` if the WebView should use its built-in zoom mechanisms. The default value is `true`. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebSettings.setBuiltInZoomControls", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setBuiltInZoomControls(boolean)") + ]) bool? builtInZoomControls; ///Set to `true` if the WebView should display on-screen zoom controls when using the built-in zoom mechanisms. The default value is `false`. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebSettings.setDisplayZoomControls", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setDisplayZoomControls(boolean)") + ]) bool? displayZoomControls; ///Set to `true` if you want the database storage API is enabled. The default value is `true`. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebSettings.setDatabaseEnabled", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setDatabaseEnabled(boolean)") + ]) bool? databaseEnabled; ///Set to `true` if you want the DOM storage API is enabled. The default value is `true`. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebSettings.setDomStorageEnabled", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setDomStorageEnabled(boolean)") + ]) bool? domStorageEnabled; ///Set to `true` if the WebView should enable support for the "viewport" HTML meta tag or should use a wide viewport. ///When the value of the setting is false, the layout width is always set to the width of the WebView control in device-independent (CSS) pixels. ///When the value is true and the page contains the viewport meta tag, the value of the width specified in the tag is used. ///If the page does not contain the tag or does not provide a width, then a wide viewport will be used. The default value is `true`. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebSettings.setUseWideViewPort", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setUseWideViewPort(boolean)") + ]) bool? useWideViewPort; ///Sets whether Safe Browsing is enabled. Safe Browsing allows WebView to protect against malware and phishing attacks by verifying the links. ///Safe Browsing is enabled by default for devices which support it. - /// - ///**NOTE**: available on Android 26+. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + available: "26", + apiName: "WebSettings.setSafeBrowsingEnabled", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setSafeBrowsingEnabled(boolean)") + ]) bool? safeBrowsingEnabled; ///Configures the WebView's behavior when a secure origin attempts to load a resource from an insecure origin. - /// - ///**NOTE**: available on Android 21+. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + available: "21", + apiName: "WebSettings.setMixedContentMode", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setMixedContentMode(int)") + ]) MixedContentMode_? mixedContentMode; ///Enables or disables content URL access within WebView. Content URL access allows WebView to load content from a content provider installed in the system. The default value is `true`. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebSettings.setAllowContentAccess", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setAllowContentAccess(boolean)") + ]) bool? allowContentAccess; ///Enables or disables file access within WebView. Note that this enables or disables file system access only. ///Assets and resources are still accessible using `file:///android_asset` and `file:///android_res`. The default value is `true`. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebSettings.setAllowFileAccess", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setAllowFileAccess(boolean)") + ]) bool? allowFileAccess; ///Sets the path to the Application Caches files. In order for the Application Caches API to be enabled, this option must be set a path to which the application can write. ///This option is used one time: repeated calls are ignored. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms( + platforms: [AndroidPlatform(apiName: "WebSettings.setAppCachePath")]) String? appCachePath; ///Sets whether the WebView should not load image resources from the network (resources accessed via http and https URI schemes). The default value is `false`. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebSettings.setBlockNetworkImage", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings#setBlockNetworkImage(boolean)") + ]) bool? blockNetworkImage; ///Sets whether the WebView should not load resources from the network. The default value is `false`. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebSettings.setBlockNetworkLoads", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings#setBlockNetworkLoads(boolean)") + ]) bool? blockNetworkLoads; ///Overrides the way the cache is used. The way the cache is used is based on the navigation type. For a normal page load, the cache is checked and content is re-validated as needed. ///When navigating back, content is not revalidated, instead the content is just retrieved from the cache. The default value is [CacheMode.LOAD_DEFAULT]. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebSettings.setCacheMode", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings#setCacheMode(int)") + ]) CacheMode_? cacheMode; ///Sets the cursive font family name. The default value is `"cursive"`. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebSettings.setCursiveFontFamily", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings#setCursiveFontFamily(java.lang.String)") + ]) String? cursiveFontFamily; ///Sets the default fixed font size. The default value is `16`. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebSettings.setDefaultFixedFontSize", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings#setDefaultFixedFontSize(int)") + ]) int? defaultFixedFontSize; ///Sets the default font size. The default value is `16`. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebSettings.setDefaultFontSize", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings#setDefaultFontSize(int)") + ]) int? defaultFontSize; ///Sets the default text encoding name to use when decoding html pages. The default value is `"UTF-8"`. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebSettings.setDefaultTextEncodingName", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings#setDefaultTextEncodingName(java.lang.String)") + ]) String? defaultTextEncodingName; ///Disables the action mode menu items according to menuItems flag. - /// - ///**NOTE**: available on Android 24+. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + available: "24", + apiName: "WebSettings.setDisabledActionModeMenuItems", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings#setDisabledActionModeMenuItems(int)") + ]) ActionModeMenuItem_? disabledActionModeMenuItems; ///Sets the fantasy font family name. The default value is `"fantasy"`. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebSettings.setFantasyFontFamily", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings#setFantasyFontFamily(java.lang.String)") + ]) String? fantasyFontFamily; ///Sets the fixed font family name. The default value is `"monospace"`. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebSettings.setFixedFontFamily", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings#setFixedFontFamily(java.lang.String)") + ]) String? fixedFontFamily; ///Set the force dark mode for this WebView. The default value is [ForceDark.OFF]. - /// - ///**NOTE**: available on Android 29+. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + available: "29", + apiName: "WebSettings.setForceDark", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings#setForceDark(int)") + ]) ForceDark_? forceDark; + ///Sets whether Geolocation API is enabled. The default value is `true`. + ///Set how WebView content should be darkened. ///The default value is [ForceDarkStrategy.PREFER_WEB_THEME_OVER_USER_AGENT_DARKENING]. - /// - ///**NOTE on Android**: it will take effect only if [WebViewFeature.isFeatureSupported] returns `true` for [WebViewFeature.FORCE_DARK_STRATEGY]. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebSettingsCompat.setForceDarkStrategy", + apiUrl: + "https://developer.android.com/reference/androidx/webkit/WebSettingsCompat#setForceDarkStrategy(android.webkit.WebSettings,int)", + note: + "it will take effect only if [WebViewFeature.isFeatureSupported] returns `true` for [WebViewFeature.FORCE_DARK_STRATEGY].") + ]) ForceDarkStrategy_? forceDarkStrategy; - ///Sets whether Geolocation API is enabled. The default value is `true`. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + ///Sets whether Geolocation is enabled. The default is `true`. + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebSettings.setGeolocationEnabled", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setGeolocationEnabled(boolean)", + note: + """Please note that in order for the Geolocation API to be usable by a page in the WebView, the following requirements must be met: +- an application must have permission to access the device location, see [Manifest.permission.ACCESS_COARSE_LOCATION](https://developer.android.com/reference/android/Manifest.permission#ACCESS_COARSE_LOCATION), [Manifest.permission.ACCESS_FINE_LOCATION](https://developer.android.com/reference/android/Manifest.permission#ACCESS_FINE_LOCATION); +- an application must provide an implementation of the [WebView.onGeolocationPermissionsShowPrompt] callback to receive notifications that a page is requesting access to location via the JavaScript Geolocation API.""") + ]) bool? geolocationEnabled; ///Sets the underlying layout algorithm. This will cause a re-layout of the WebView. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebSettings.setLayoutAlgorithm", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setLayoutAlgorithm(android.webkit.WebSettings.LayoutAlgorithm)") + ]) LayoutAlgorithm_? layoutAlgorithm; ///Sets whether the WebView loads pages in overview mode, that is, zooms out the content to fit on screen by width. ///This setting is taken into account when the content width is greater than the width of the WebView control, for example, when [useWideViewPort] is enabled. ///The default value is `false`. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebSettings.setLoadWithOverviewMode", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setLoadWithOverviewMode(boolean)") + ]) bool? loadWithOverviewMode; ///Sets whether the WebView should load image resources. Note that this method controls loading of all images, including those embedded using the data URI scheme. ///Note that if the value of this setting is changed from false to true, all images resources referenced by content currently displayed by the WebView are loaded automatically. ///The default value is `true`. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebSettings.setLoadsImagesAutomatically", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setLoadsImagesAutomatically(boolean)") + ]) bool? loadsImagesAutomatically; ///Sets the minimum logical font size. The default is `8`. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebSettings.setMinimumLogicalFontSize", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setMinimumLogicalFontSize(int)") + ]) int? minimumLogicalFontSize; ///Sets the initial scale for this WebView. 0 means default. The behavior for the default scale depends on the state of [useWideViewPort] and [loadWithOverviewMode]. @@ -563,92 +656,118 @@ class InAppWebViewSettings_ { ///If initial scale is greater than 0, WebView starts with this value as initial scale. ///Please note that unlike the scale properties in the viewport meta tag, this method doesn't take the screen density into account. ///The default is `0`. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebView.setInitialScale", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebView#setInitialScale(int)") + ]) int? initialScale; ///Tells the WebView whether it needs to set a node. The default value is `true`. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebSettings.setNeedInitialFocus", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setNeedInitialFocus(boolean)") + ]) bool? needInitialFocus; ///Sets whether this WebView should raster tiles when it is offscreen but attached to a window. ///Turning this on can avoid rendering artifacts when animating an offscreen WebView on-screen. ///Offscreen WebViews in this mode use more memory. The default value is `false`. - /// - ///**NOTE**: available on Android 23+. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + available: "23", + apiName: "WebSettings.setOffscreenPreRaster", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setOffscreenPreRaster(boolean)") + ]) bool? offscreenPreRaster; ///Sets the sans-serif font family name. The default value is `"sans-serif"`. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebSettings.setSansSerifFontFamily", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setSansSerifFontFamily(java.lang.String)") + ]) String? sansSerifFontFamily; ///Sets the serif font family name. The default value is `"sans-serif"`. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebSettings.setSerifFontFamily", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setSerifFontFamily(java.lang.String)") + ]) String? serifFontFamily; ///Sets the standard font family name. The default value is `"sans-serif"`. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebSettings.setStandardFontFamily", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setStandardFontFamily(java.lang.String)") + ]) String? standardFontFamily; ///Sets whether the WebView should save form data. In Android O, the platform has implemented a fully functional Autofill feature to store form data. ///Therefore, the Webview form data save feature is disabled. Note that the feature will continue to be supported on older versions of Android as before. ///The default value is `true`. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebSettings.setSaveFormData", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setSaveFormData(boolean)") + ]) bool? saveFormData; ///Boolean value to enable third party cookies in the WebView. ///Used on Android Lollipop and above only as third party cookies are enabled by default on Android Kitkat and below and on iOS. ///The default value is `true`. - /// - ///**NOTE**: available on Android 21+. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + available: "21", + apiName: "CookieManager.setAcceptThirdPartyCookies", + apiUrl: + "https://developer.android.com/reference/android/webkit/CookieManager#setAcceptThirdPartyCookies(android.webkit.WebView,%20boolean)") + ]) bool? thirdPartyCookiesEnabled; ///Boolean value to enable Hardware Acceleration in the WebView. ///The default value is `true`. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebView.setLayerType", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebView#setLayerType(int,%20android.graphics.Paint)") + ]) bool? hardwareAcceleration; ///Sets whether the WebView supports multiple windows. ///If set to `true`, [WebView.onCreateWindow] event must be implemented by the host application. The default value is `false`. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebSettings.setSupportMultipleWindows", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setSupportMultipleWindows(boolean)") + ]) bool? supportMultipleWindows; ///Regular expression used by [WebView.shouldOverrideUrlLoading] event to cancel navigation requests for frames that are not the main frame. ///If the url request of a subframe matches the regular expression, then the request of that subframe is canceled. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [AndroidPlatform()]) String? regexToCancelSubFramesLoading; ///Set to `false` to disable Flutter Hybrid Composition. The default value is `true`. ///Hybrid Composition is supported starting with Flutter v1.20+. - /// - ///**NOTE**: It is recommended to use Hybrid Composition only on Android 10+ for a release app, - ///as it can cause framerate drops on animations in Android 9 and lower (see [Hybrid-Composition#performance](https://github.com/flutter/flutter/wiki/Hybrid-Composition#performance)). - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + note: + """It is recommended to use Hybrid Composition only on Android 10+ for a release app, +as it can cause framerate drops on animations in Android 9 and lower (see [Hybrid-Composition#performance](https://github.com/flutter/flutter/wiki/Hybrid-Composition#performance)).""") + ]) bool? useHybridComposition; ///Set to `true` to be able to listen at the [WebView.shouldInterceptRequest] event. @@ -656,9 +775,7 @@ class InAppWebViewSettings_ { ///If the [WebView.shouldInterceptRequest] event is implemented and this value is `null`, ///it will be automatically inferred as `true`, otherwise, the default value is `false`. ///This logic will not be applied for [InAppBrowser], where you must set the value manually. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [AndroidPlatform()]) bool? useShouldInterceptRequest; ///Set to `true` to be able to listen at the [WebView.onRenderProcessGone] event. @@ -666,24 +783,28 @@ class InAppWebViewSettings_ { ///If the [WebView.onRenderProcessGone] event is implemented and this value is `null`, ///it will be automatically inferred as `true`, otherwise, the default value is `false`. ///This logic will not be applied for [InAppBrowser], where you must set the value manually. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [AndroidPlatform()]) bool? useOnRenderProcessGone; ///Sets the WebView's over-scroll mode. ///Setting the over-scroll mode of a WebView will have an effect only if the WebView is capable of scrolling. ///The default value is [OverScrollMode.IF_CONTENT_SCROLLS]. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "View.setOverScrollMode", + apiUrl: + "https://developer.android.com/reference/android/view/View#setOverScrollMode(int)") + ]) OverScrollMode_? overScrollMode; ///Informs WebView of the network state. ///This is used to set the JavaScript property `window.navigator.isOnline` and generates the online/offline event as specified in HTML5, sec. 5.7.7. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebView.setNetworkAvailable", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebView#setNetworkAvailable(boolean)") + ]) bool? networkAvailable; ///Specifies the style of the scrollbars. The scrollbars can be overlaid or inset. @@ -692,80 +813,104 @@ class InAppWebViewSettings_ { ///you can use SCROLLBARS_INSIDE_OVERLAY or SCROLLBARS_INSIDE_INSET. If you want them to appear at the edge of the view, ignoring the padding, ///then you can use SCROLLBARS_OUTSIDE_OVERLAY or SCROLLBARS_OUTSIDE_INSET. ///The default value is [ScrollBarStyle.SCROLLBARS_INSIDE_OVERLAY]. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebView.setScrollBarStyle", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebView#setScrollBarStyle(int)") + ]) ScrollBarStyle_? scrollBarStyle; ///Sets the position of the vertical scroll bar. ///The default value is [VerticalScrollbarPosition.SCROLLBAR_POSITION_DEFAULT]. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "View.setVerticalScrollbarPosition", + apiUrl: + "https://developer.android.com/reference/android/view/View#setVerticalScrollbarPosition(int)") + ]) VerticalScrollbarPosition_? verticalScrollbarPosition; ///Defines the delay in milliseconds that a scrollbar waits before fade out. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "View.setScrollBarDefaultDelayBeforeFade", + apiUrl: + "https://developer.android.com/reference/android/view/View#setScrollBarDefaultDelayBeforeFade(int)") + ]) int? scrollBarDefaultDelayBeforeFade; ///Defines whether scrollbars will fade when the view is not scrolling. ///The default value is `true`. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "View.setScrollbarFadingEnabled", + apiUrl: + "https://developer.android.com/reference/android/view/View#setScrollbarFadingEnabled(boolean)") + ]) bool? scrollbarFadingEnabled; ///Defines the scrollbar fade duration in milliseconds. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "View.setScrollBarFadeDuration", + apiUrl: + "https://developer.android.com/reference/android/view/View#setScrollBarFadeDuration(int)") + ]) int? scrollBarFadeDuration; ///Sets the renderer priority policy for this WebView. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + apiName: "WebView.setRendererPriorityPolicy", + apiUrl: + "https://developer.android.com/reference/android/webkit/WebView#setRendererPriorityPolicy(int,%20boolean)") + ]) RendererPriorityPolicy_? rendererPriorityPolicy; ///Sets whether the default Android WebView’s internal error page should be suppressed or displayed for bad navigations. ///`true` means suppressed (not shown), `false` means it will be displayed. The default value is `false`. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [AndroidPlatform()]) bool? disableDefaultErrorPage; ///Sets the vertical scrollbar thumb color. - /// - ///**NOTE**: available on Android 29+. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + available: "29", + apiName: "View.setVerticalScrollbarThumbDrawable", + apiUrl: + "https://developer.android.com/reference/android/view/View#setVerticalScrollbarThumbDrawable(android.graphics.drawable.Drawable)") + ]) Color? verticalScrollbarThumbColor; ///Sets the vertical scrollbar track color. - /// - ///**NOTE**: available on Android 29+. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + available: "29", + apiName: "View.setVerticalScrollbarTrackDrawable", + apiUrl: + "https://developer.android.com/reference/android/view/View#setVerticalScrollbarTrackDrawable(android.graphics.drawable.Drawable)") + ]) Color? verticalScrollbarTrackColor; ///Sets the horizontal scrollbar thumb color. - /// - ///**NOTE**: available on Android 29+. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + available: "29", + apiName: "View.setHorizontalScrollbarThumbDrawable", + apiUrl: + "https://developer.android.com/reference/android/view/View#setHorizontalScrollbarThumbDrawable(android.graphics.drawable.Drawable)") + ]) Color? horizontalScrollbarThumbColor; ///Sets the horizontal scrollbar track color. - /// - ///**NOTE**: available on Android 29+. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + available: "29", + apiName: "View.setHorizontalScrollbarTrackDrawable", + apiUrl: + "https://developer.android.com/reference/android/view/View#setHorizontalScrollbarTrackDrawable(android.graphics.drawable.Drawable)") + ]) Color? horizontalScrollbarTrackColor; ///Control whether algorithmic darkening is allowed. @@ -779,24 +924,26 @@ class InAppWebViewSettings_ { ///If the app's theme is dark and it allows algorithmic darkening, ///WebView will attempt to darken web content using an algorithm, ///if the content doesn't define its own dark styles and doesn't explicitly disable darkening. - /// - ///If Android is applying Force Dark to WebView then WebView will ignore the value of this setting and behave as if it were set to true. - /// - ///**NOTE**: available on Android only if [WebViewFeature.ALGORITHMIC_DARKENING] feature is supported. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + available: "29", + apiName: "WebSettingsCompat.setAlgorithmicDarkeningAllowed", + apiUrl: + "https://developer.android.com/reference/androidx/webkit/WebSettingsCompat#setAlgorithmicDarkeningAllowed(android.webkit.WebSettings,boolean)", + note: + "available on Android only if [WebViewFeature.ALGORITHMIC_DARKENING] feature is supported.") + ]) bool? algorithmicDarkeningAllowed; ///Sets how the WebView will set the `X-Requested-With` header on requests. ///If you are calling this method, you may also want to call [ServiceWorkerWebSettingsCompat.setRequestedWithHeaderMode] ///with the same parameter value to configure ServiceWorker requests. ///The default behavior may vary depending on the WebView implementation. - /// - ///**NOTE**: available on Android only if [WebViewFeature.REQUESTED_WITH_HEADER_CONTROL] feature is supported. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + note: + "available on Android only if [WebViewFeature.REQUESTED_WITH_HEADER_CONTROL] feature is supported.") + ]) RequestedWithHeaderMode_? requestedWithHeaderMode; ///Sets whether EnterpriseAuthenticationAppLinkPolicy if set by admin is allowed to have any @@ -807,211 +954,267 @@ class InAppWebViewSettings_ { ///registered as the default handler for the url, that app is launched. /// ///The default value is `true`. - /// - ///**NOTE**: available on Android only if [WebViewFeature.ENTERPRISE_AUTHENTICATION_APP_LINK_POLICY] feature is supported. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [ + AndroidPlatform( + note: + "available on Android only if [WebViewFeature.ENTERPRISE_AUTHENTICATION_APP_LINK_POLICY] feature is supported.") + ]) bool? enterpriseAuthenticationAppLinkPolicyEnabled; ///When not playing, video elements are represented by a 'poster' image. ///The image to use can be specified by the poster attribute of the video tag in HTML. ///If the attribute is absent, then a default poster will be used. ///This property allows the WebView to provide that default image. - /// - ///**Supported Platforms/Implementations**: - ///- Android native WebView + @SupportedPlatforms(platforms: [AndroidPlatform()]) Uint8List? defaultVideoPoster; ///Set to `true` to disable the bouncing of the WebView when the scrolling has reached an edge of the content. The default value is `false`. - /// - ///**Supported Platforms/Implementations**: - ///- iOS + @SupportedPlatforms(platforms: [IOSPlatform()]) bool? disallowOverScroll; ///Set to `true` to allow a viewport meta tag to either disable or restrict the range of user scaling. The default value is `false`. - /// - ///**Supported Platforms/Implementations**: - ///- iOS - ///- MacOS + @SupportedPlatforms(platforms: [IOSPlatform(), MacOSPlatform()]) bool? enableViewportScale; ///Set to `true` if you want the WebView suppresses content rendering until it is fully loaded into memory. The default value is `false`. - /// - ///**Supported Platforms/Implementations**: - ///- iOS - ///- MacOS + @SupportedPlatforms(platforms: [ + IOSPlatform( + apiName: "WKWebViewConfiguration.suppressesIncrementalRendering", + apiUrl: + "https://developer.apple.com/documentation/webkit/wkwebviewconfiguration/1395663-suppressesincrementalrendering"), + MacOSPlatform( + apiName: "WKWebViewConfiguration.suppressesIncrementalRendering", + apiUrl: + "https://developer.apple.com/documentation/webkit/wkwebviewconfiguration/1395663-suppressesincrementalrendering") + ]) bool? suppressesIncrementalRendering; ///Set to `true` to allow AirPlay. The default value is `true`. - /// - ///**Supported Platforms/Implementations**: - ///- iOS - ///- MacOS + @SupportedPlatforms(platforms: [ + IOSPlatform( + apiName: "WKWebViewConfiguration.allowsAirPlayForMediaPlayback", + apiUrl: + "https://developer.apple.com/documentation/webkit/wkwebviewconfiguration/1395673-allowsairplayformediaplayback"), + MacOSPlatform( + apiName: "WKWebViewConfiguration.allowsAirPlayForMediaPlayback", + apiUrl: + "https://developer.apple.com/documentation/webkit/wkwebviewconfiguration/1395673-allowsairplayformediaplayback") + ]) bool? allowsAirPlayForMediaPlayback; ///Set to `true` to allow the horizontal swipe gestures trigger back-forward list navigations. The default value is `true`. - /// - ///**Supported Platforms/Implementations**: - ///- iOS - ///- MacOS + @SupportedPlatforms(platforms: [ + IOSPlatform( + apiName: "WKWebView.allowsBackForwardNavigationGestures", + apiUrl: + "https://developer.apple.com/documentation/webkit/wkwebview/1414995-allowsbackforwardnavigationgestu"), + MacOSPlatform( + apiName: "WKWebView.allowsBackForwardNavigationGestures", + apiUrl: + "https://developer.apple.com/documentation/webkit/wkwebview/1414995-allowsbackforwardnavigationgestu") + ]) bool? allowsBackForwardNavigationGestures; ///Set to `true` to allow that pressing on a link displays a preview of the destination for the link. The default value is `true`. - /// - ///**NOTE**: available on iOS 9.0+. - /// - ///**Supported Platforms/Implementations**: - ///- iOS - ///- MacOS + @SupportedPlatforms(platforms: [ + IOSPlatform( + apiName: "WKWebView.allowsLinkPreview", + apiUrl: + "https://developer.apple.com/documentation/webkit/wkwebview/1415000-allowslinkpreview"), + MacOSPlatform( + apiName: "WKWebView.allowsLinkPreview", + apiUrl: + "https://developer.apple.com/documentation/webkit/wkwebview/1415000-allowslinkpreview") + ]) bool? allowsLinkPreview; ///Set to `true` if you want that the WebView should always allow scaling of the webpage, regardless of the author's intent. ///The ignoresViewportScaleLimits property overrides the `user-scalable` HTML property in a webpage. The default value is `false`. - /// - ///**Supported Platforms/Implementations**: - ///- iOS + @SupportedPlatforms(platforms: [ + IOSPlatform( + apiName: "WKWebViewConfiguration.ignoresViewportScaleLimits", + apiUrl: + "https://developer.apple.com/documentation/webkit/wkwebviewconfiguration/2274633-ignoresviewportscalelimits") + ]) bool? ignoresViewportScaleLimits; ///Set to `true` to allow HTML5 media playback to appear inline within the screen layout, using browser-supplied controls rather than native controls. ///For this to work, add the `webkit-playsinline` attribute to any `