updated docs
This commit is contained in:
parent
0b0869ce2a
commit
d57af8eb46
@ -66,11 +66,11 @@ abstract class Util {
|
|||||||
return """///
|
return """///
|
||||||
${platformNoteList.join("\n///\n")}
|
${platformNoteList.join("\n///\n")}
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
${platformSupportedList.join("\n")}""";
|
${platformSupportedList.join("\n")}""";
|
||||||
} else {
|
} else {
|
||||||
return """///
|
return """///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
${platformSupportedList.join("\n")}""";
|
${platformSupportedList.join("\n")}""";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,19 +26,10 @@ class AndroidChromeSafariBrowserCreationParams
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///This class uses native [Chrome Custom Tabs](https://developer.android.com/reference/android/support/customtabs/package-summary) on Android
|
///{@macro flutter_inappwebview_platform_interface.PlatformChromeSafariBrowser}
|
||||||
///and [SFSafariViewController](https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller) on iOS.
|
|
||||||
///
|
|
||||||
///**NOTE**: If you want to use the `ChromeSafariBrowser` class on Android 11+ you need to specify your app querying for
|
|
||||||
///`android.support.customtabs.action.CustomTabsService` in your `AndroidManifest.xml`
|
|
||||||
///(you can read more about it here: https://developers.google.com/web/android/custom-tabs/best-practices#applications_targeting_android_11_api_level_30_or_above).
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android
|
|
||||||
///- iOS
|
|
||||||
class AndroidChromeSafariBrowser extends PlatformChromeSafariBrowser
|
class AndroidChromeSafariBrowser extends PlatformChromeSafariBrowser
|
||||||
with ChannelController {
|
with ChannelController {
|
||||||
///View ID used internally.
|
@override
|
||||||
final String id = IdGenerator.generate();
|
final String id = IdGenerator.generate();
|
||||||
|
|
||||||
/// Constructs a [AndroidChromeSafariBrowser].
|
/// Constructs a [AndroidChromeSafariBrowser].
|
||||||
@ -53,6 +44,7 @@ class AndroidChromeSafariBrowser extends PlatformChromeSafariBrowser
|
|||||||
static final AndroidChromeSafariBrowser _staticValue =
|
static final AndroidChromeSafariBrowser _staticValue =
|
||||||
AndroidChromeSafariBrowser(AndroidChromeSafariBrowserCreationParams());
|
AndroidChromeSafariBrowser(AndroidChromeSafariBrowserCreationParams());
|
||||||
|
|
||||||
|
/// Provide static access.
|
||||||
factory AndroidChromeSafariBrowser.static() {
|
factory AndroidChromeSafariBrowser.static() {
|
||||||
return _staticValue;
|
return _staticValue;
|
||||||
}
|
}
|
||||||
@ -193,25 +185,7 @@ class AndroidChromeSafariBrowser extends PlatformChromeSafariBrowser
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///Opens the [AndroidChromeSafariBrowser] instance with an [url].
|
@override
|
||||||
///
|
|
||||||
///[url] - The [url] to load. On iOS, the [url] is required and must use the `http` or `https` scheme.
|
|
||||||
///
|
|
||||||
///[headers] (Supported only on Android) - [whitelisted](https://fetch.spec.whatwg.org/#cors-safelisted-request-header) cross-origin request headers.
|
|
||||||
///It is possible to attach non-whitelisted headers to cross-origin requests, when the server and client are related using a
|
|
||||||
///[digital asset link](https://developers.google.com/digital-asset-links/v1/getting-started).
|
|
||||||
///
|
|
||||||
///[otherLikelyURLs] - Other likely destinations, sorted in decreasing likelihood order. Supported only on Android.
|
|
||||||
///
|
|
||||||
///[referrer] - referrer header. Supported only on Android.
|
|
||||||
///
|
|
||||||
///[options] - Deprecated. Use `settings` instead.
|
|
||||||
///
|
|
||||||
///[settings] - Settings for the [AndroidChromeSafariBrowser].
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android
|
|
||||||
///- iOS
|
|
||||||
Future<void> open(
|
Future<void> open(
|
||||||
{WebUri? url,
|
{WebUri? url,
|
||||||
Map<String, String>? headers,
|
Map<String, String>? headers,
|
||||||
@ -258,20 +232,7 @@ class AndroidChromeSafariBrowser extends PlatformChromeSafariBrowser
|
|||||||
await _staticChannel.invokeMethod('open', args);
|
await _staticChannel.invokeMethod('open', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Tells the browser to launch with [url].
|
@override
|
||||||
///
|
|
||||||
///[url] - initial url.
|
|
||||||
///
|
|
||||||
///[headers] (Supported only on Android) - [whitelisted](https://fetch.spec.whatwg.org/#cors-safelisted-request-header) cross-origin request headers.
|
|
||||||
///It is possible to attach non-whitelisted headers to cross-origin requests, when the server and client are related using a
|
|
||||||
///[digital asset link](https://developers.google.com/digital-asset-links/v1/getting-started).
|
|
||||||
///
|
|
||||||
///[otherLikelyURLs] - Other likely destinations, sorted in decreasing likelihood order.
|
|
||||||
///
|
|
||||||
///[referrer] - referrer header. Supported only on Android.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android
|
|
||||||
Future<void> launchUrl({
|
Future<void> launchUrl({
|
||||||
required WebUri url,
|
required WebUri url,
|
||||||
Map<String, String>? headers,
|
Map<String, String>? headers,
|
||||||
@ -287,18 +248,7 @@ class AndroidChromeSafariBrowser extends PlatformChromeSafariBrowser
|
|||||||
await channel?.invokeMethod("launchUrl", args);
|
await channel?.invokeMethod("launchUrl", args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Tells the browser of a likely future navigation to a URL.
|
@override
|
||||||
///The most likely URL has to be specified first.
|
|
||||||
///Optionally, a list of other likely URLs can be provided.
|
|
||||||
///They are treated as less likely than the first one, and have to be sorted in decreasing priority order.
|
|
||||||
///These additional URLs may be ignored. All previous calls to this method will be deprioritized.
|
|
||||||
///
|
|
||||||
///[url] - Most likely URL, may be null if otherLikelyBundles is provided.
|
|
||||||
///
|
|
||||||
///[otherLikelyURLs] - Other likely destinations, sorted in decreasing likelihood order.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android ([Official API - CustomTabsSession.mayLaunchUrl](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsSession#mayLaunchUrl(android.net.Uri,android.os.Bundle,java.util.List%3Candroid.os.Bundle%3E)))
|
|
||||||
Future<bool> mayLaunchUrl(
|
Future<bool> mayLaunchUrl(
|
||||||
{WebUri? url, List<WebUri>? otherLikelyURLs}) async {
|
{WebUri? url, List<WebUri>? otherLikelyURLs}) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
@ -308,22 +258,7 @@ class AndroidChromeSafariBrowser extends PlatformChromeSafariBrowser
|
|||||||
return await channel?.invokeMethod<bool>("mayLaunchUrl", args) ?? false;
|
return await channel?.invokeMethod<bool>("mayLaunchUrl", args) ?? false;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Requests to validate a relationship between the application and an origin.
|
@override
|
||||||
///
|
|
||||||
///See [here](https://developers.google.com/digital-asset-links/v1/getting-started) for documentation about Digital Asset Links.
|
|
||||||
///This methods requests the browser to verify a relation with the calling application, to grant the associated rights.
|
|
||||||
///
|
|
||||||
///If this method returns `true`, the validation result will be provided through [onRelationshipValidationResult].
|
|
||||||
///Otherwise the request didn't succeed.
|
|
||||||
///
|
|
||||||
///[relation] – Relation to check, must be one of the [CustomTabsRelationType] constants.
|
|
||||||
///
|
|
||||||
///[origin] – Origin.
|
|
||||||
///
|
|
||||||
///[extras] – Reserved for future use.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android ([Official API - CustomTabsSession.validateRelationship](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsSession#validateRelationship(int,android.net.Uri,android.os.Bundle)))
|
|
||||||
Future<bool> validateRelationship(
|
Future<bool> validateRelationship(
|
||||||
{required CustomTabsRelationType relation,
|
{required CustomTabsRelationType relation,
|
||||||
required WebUri origin}) async {
|
required WebUri origin}) async {
|
||||||
@ -334,32 +269,18 @@ class AndroidChromeSafariBrowser extends PlatformChromeSafariBrowser
|
|||||||
false;
|
false;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Closes the [AndroidChromeSafariBrowser] instance.
|
@override
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android
|
|
||||||
///- iOS
|
|
||||||
Future<void> close() async {
|
Future<void> close() async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
await channel?.invokeMethod("close", args);
|
await channel?.invokeMethod("close", args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Set a custom action button.
|
@override
|
||||||
///
|
|
||||||
///**NOTE**: Not available in a Trusted Web Activity.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android ([Official API - CustomTabsIntent.Builder.setActionButton](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsIntent.Builder#setActionButton(android.graphics.Bitmap,%20java.lang.String,%20android.app.PendingIntent,%20boolean)))
|
|
||||||
void setActionButton(ChromeSafariBrowserActionButton actionButton) {
|
void setActionButton(ChromeSafariBrowserActionButton actionButton) {
|
||||||
this._actionButton = actionButton;
|
this._actionButton = actionButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Updates the [ChromeSafariBrowserActionButton.icon] and [ChromeSafariBrowserActionButton.description].
|
@override
|
||||||
///
|
|
||||||
///**NOTE**: Not available in a Trusted Web Activity.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android ([Official API - CustomTabsSession.setActionButton](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsSession#setActionButton(android.graphics.Bitmap,java.lang.String)))
|
|
||||||
Future<void> updateActionButton(
|
Future<void> updateActionButton(
|
||||||
{required Uint8List icon, required String description}) async {
|
{required Uint8List icon, required String description}) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
@ -370,23 +291,13 @@ class AndroidChromeSafariBrowser extends PlatformChromeSafariBrowser
|
|||||||
_actionButton?.description = description;
|
_actionButton?.description = description;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Sets the remote views displayed in the secondary toolbar in a custom tab.
|
@override
|
||||||
///
|
|
||||||
///**NOTE**: Not available in a Trusted Web Activity.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android ([Official API - CustomTabsIntent.Builder.setSecondaryToolbarViews](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsIntent.Builder#setSecondaryToolbarViews(android.widget.RemoteViews,int[],android.app.PendingIntent)))
|
|
||||||
void setSecondaryToolbar(
|
void setSecondaryToolbar(
|
||||||
ChromeSafariBrowserSecondaryToolbar secondaryToolbar) {
|
ChromeSafariBrowserSecondaryToolbar secondaryToolbar) {
|
||||||
this._secondaryToolbar = secondaryToolbar;
|
this._secondaryToolbar = secondaryToolbar;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Sets or updates (if already present) the Remote Views of the secondary toolbar in an existing custom tab session.
|
@override
|
||||||
///
|
|
||||||
///**NOTE**: Not available in a Trusted Web Activity.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android ([Official API - CustomTabsSession.setSecondaryToolbarViews](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsSession#setSecondaryToolbarViews(android.widget.RemoteViews,int[],android.app.PendingIntent)))
|
|
||||||
Future<void> updateSecondaryToolbar(
|
Future<void> updateSecondaryToolbar(
|
||||||
ChromeSafariBrowserSecondaryToolbar secondaryToolbar) async {
|
ChromeSafariBrowserSecondaryToolbar secondaryToolbar) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
@ -395,47 +306,19 @@ class AndroidChromeSafariBrowser extends PlatformChromeSafariBrowser
|
|||||||
this._secondaryToolbar = secondaryToolbar;
|
this._secondaryToolbar = secondaryToolbar;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Adds a [ChromeSafariBrowserMenuItem] to the menu.
|
@override
|
||||||
///
|
|
||||||
///**NOTE**: Not available in an Android Trusted Web Activity.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android
|
|
||||||
///- iOS
|
|
||||||
void addMenuItem(ChromeSafariBrowserMenuItem menuItem) {
|
void addMenuItem(ChromeSafariBrowserMenuItem menuItem) {
|
||||||
this._menuItems[menuItem.id] = menuItem;
|
this._menuItems[menuItem.id] = menuItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Adds a list of [ChromeSafariBrowserMenuItem] to the menu.
|
@override
|
||||||
///
|
|
||||||
///**NOTE**: Not available in an Android Trusted Web Activity.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android
|
|
||||||
///- iOS
|
|
||||||
void addMenuItems(List<ChromeSafariBrowserMenuItem> menuItems) {
|
void addMenuItems(List<ChromeSafariBrowserMenuItem> menuItems) {
|
||||||
menuItems.forEach((menuItem) {
|
menuItems.forEach((menuItem) {
|
||||||
this._menuItems[menuItem.id] = menuItem;
|
this._menuItems[menuItem.id] = menuItem;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
///Sends a request to create a two way postMessage channel between the client
|
@override
|
||||||
///and the browser.
|
|
||||||
///If you want to specifying the target origin to communicate with, set the [targetOrigin].
|
|
||||||
///
|
|
||||||
///[sourceOrigin] - A origin that the client is requesting to be
|
|
||||||
///identified as during the postMessage communication.
|
|
||||||
///It has to either start with http or https.
|
|
||||||
///
|
|
||||||
///[targetOrigin] - The target Origin to establish the postMessage communication with.
|
|
||||||
///This can be the app's package name, it has to either start with http or https.
|
|
||||||
///
|
|
||||||
///Returns whether the implementation accepted the request.
|
|
||||||
///Note that returning true here doesn't mean an origin has already been
|
|
||||||
///assigned as the validation is asynchronous.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android ([Official API - CustomTabsSession.requestPostMessageChannel](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsSession#requestPostMessageChannel(android.net.Uri,android.net.Uri,android.os.Bundle)))
|
|
||||||
Future<bool> requestPostMessageChannel(
|
Future<bool> requestPostMessageChannel(
|
||||||
{required WebUri sourceOrigin, WebUri? targetOrigin}) async {
|
{required WebUri sourceOrigin, WebUri? targetOrigin}) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
@ -446,16 +329,7 @@ class AndroidChromeSafariBrowser extends PlatformChromeSafariBrowser
|
|||||||
false;
|
false;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Sends a postMessage request using the origin communicated via [requestPostMessageChannel].
|
@override
|
||||||
///Fails when called before [onMessageChannelReady] event.
|
|
||||||
///
|
|
||||||
///[message] – The message that is being sent.
|
|
||||||
///
|
|
||||||
///Returns an integer constant about the postMessage request result.
|
|
||||||
///Will return CustomTabsService.RESULT_SUCCESS if successful.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android ([Official API - CustomTabsSession.postMessage](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsSession#postMessage(java.lang.String,android.os.Bundle)))
|
|
||||||
Future<CustomTabsPostMessageResultType> postMessage(String message) async {
|
Future<CustomTabsPostMessageResultType> postMessage(String message) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
args.putIfAbsent("message", () => message);
|
args.putIfAbsent("message", () => message);
|
||||||
@ -464,15 +338,7 @@ class AndroidChromeSafariBrowser extends PlatformChromeSafariBrowser
|
|||||||
CustomTabsPostMessageResultType.FAILURE_MESSAGING_ERROR;
|
CustomTabsPostMessageResultType.FAILURE_MESSAGING_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Returns whether the Engagement Signals API is available.
|
@override
|
||||||
///The availability of the Engagement Signals API may change at runtime.
|
|
||||||
///If an EngagementSignalsCallback has been set, an [onSessionEnded]
|
|
||||||
///signal will be sent if the API becomes unavailable later.
|
|
||||||
///
|
|
||||||
///Returns whether the Engagement Signals API is available.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android ([Official API - CustomTabsSession.isEngagementSignalsApiAvailable](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsSession#isEngagementSignalsApiAvailable(android.os.Bundle)))
|
|
||||||
Future<bool> isEngagementSignalsApiAvailable() async {
|
Future<bool> isEngagementSignalsApiAvailable() async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
return await channel?.invokeMethod<bool>(
|
return await channel?.invokeMethod<bool>(
|
||||||
@ -480,45 +346,21 @@ class AndroidChromeSafariBrowser extends PlatformChromeSafariBrowser
|
|||||||
false;
|
false;
|
||||||
}
|
}
|
||||||
|
|
||||||
///On Android, returns `true` if Chrome Custom Tabs is available.
|
@override
|
||||||
///On iOS, returns `true` if SFSafariViewController is available.
|
|
||||||
///Otherwise returns `false`.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android
|
|
||||||
///- iOS
|
|
||||||
Future<bool> isAvailable() async {
|
Future<bool> isAvailable() async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
return await _staticChannel.invokeMethod<bool>("isAvailable", args) ??
|
return await _staticChannel.invokeMethod<bool>("isAvailable", args) ??
|
||||||
false;
|
false;
|
||||||
}
|
}
|
||||||
|
|
||||||
///The maximum number of allowed secondary toolbar items.
|
@override
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android
|
|
||||||
Future<int> getMaxToolbarItems() async {
|
Future<int> getMaxToolbarItems() async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
return await _staticChannel.invokeMethod<int>("getMaxToolbarItems", args) ??
|
return await _staticChannel.invokeMethod<int>("getMaxToolbarItems", args) ??
|
||||||
0;
|
0;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Returns the preferred package to use for Custom Tabs.
|
@override
|
||||||
///The preferred package name is the default VIEW intent handler as long as it supports Custom Tabs.
|
|
||||||
///To modify this preferred behavior, set [ignoreDefault] to `true` and give a
|
|
||||||
///non empty list of package names in packages.
|
|
||||||
///This method queries the `PackageManager` to determine which packages support the Custom Tabs API.
|
|
||||||
///On apps that target Android 11 and above, this requires adding the following
|
|
||||||
///package visibility elements to your manifest.
|
|
||||||
///
|
|
||||||
///[packages] – Ordered list of packages to test for Custom Tabs support, in decreasing order of priority.
|
|
||||||
///
|
|
||||||
///[ignoreDefault] – If set, the default VIEW handler won't get priority over other browsers.
|
|
||||||
///
|
|
||||||
///Returns the preferred package name for handling Custom Tabs, or null.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android ([Official API - CustomTabsClient.getPackageName](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsClient#getPackageName(android.content.Context,java.util.List%3Cjava.lang.String%3E,boolean))))
|
|
||||||
Future<String?> getPackageName(
|
Future<String?> getPackageName(
|
||||||
{List<String>? packages, bool ignoreDefault = false}) async {
|
{List<String>? packages, bool ignoreDefault = false}) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
@ -527,38 +369,13 @@ class AndroidChromeSafariBrowser extends PlatformChromeSafariBrowser
|
|||||||
return await _staticChannel.invokeMethod<String?>("getPackageName", args);
|
return await _staticChannel.invokeMethod<String?>("getPackageName", args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Clear associated website data accrued from browsing activity within your app.
|
@override
|
||||||
///This includes all local storage, cached resources, and cookies.
|
|
||||||
///
|
|
||||||
///**NOTE for iOS**: available on iOS 16.0+.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- iOS ([Official API - SFSafariViewController.DataStore.clearWebsiteData](https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller/datastore/3981117-clearwebsitedata))
|
|
||||||
Future<void> clearWebsiteData() async {
|
Future<void> clearWebsiteData() async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
await _staticChannel.invokeMethod("clearWebsiteData", args);
|
await _staticChannel.invokeMethod("clearWebsiteData", args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Prewarms a connection to each URL. SFSafariViewController will automatically use a
|
@override
|
||||||
///prewarmed connection if possible when loading its initial URL.
|
|
||||||
///
|
|
||||||
///Returns a token object that corresponds to the requested URLs. You must keep a strong
|
|
||||||
///reference to this token as long as you expect the prewarmed connections to remain open. If the same
|
|
||||||
///server is requested in multiple calls to this method, all of the corresponding tokens must be
|
|
||||||
///invalidated or released to end the prewarmed connection to that server.
|
|
||||||
///
|
|
||||||
///This method uses a best-effort approach to prewarming connections, but may delay
|
|
||||||
///or drop requests based on the volume of requests made by your app. Use this method when you expect
|
|
||||||
///to present the browser soon. Many HTTP servers time out connections after a few minutes.
|
|
||||||
///After a timeout, prewarming delivers less performance benefit.
|
|
||||||
///
|
|
||||||
///[URLs] - the URLs of servers that the browser should prewarm connections to.
|
|
||||||
///Only supports URLs with `http://` or `https://` schemes.
|
|
||||||
///
|
|
||||||
///**NOTE for iOS**: available on iOS 15.0+.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- iOS ([Official API - SFSafariViewController.prewarmConnections](https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller/3752133-prewarmconnections))
|
|
||||||
Future<PrewarmingToken?> prewarmConnections(List<WebUri> URLs) async {
|
Future<PrewarmingToken?> prewarmConnections(List<WebUri> URLs) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
args.putIfAbsent('URLs', () => URLs.map((e) => e.toString()).toList());
|
args.putIfAbsent('URLs', () => URLs.map((e) => e.toString()).toList());
|
||||||
@ -568,12 +385,7 @@ class AndroidChromeSafariBrowser extends PlatformChromeSafariBrowser
|
|||||||
return PrewarmingToken.fromMap(result);
|
return PrewarmingToken.fromMap(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Ends all prewarmed connections associated with the token, except for connections that are also kept alive by other tokens.
|
@override
|
||||||
///
|
|
||||||
///**NOTE for iOS**: available on iOS 15.0+.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- iOS ([Official API - SFSafariViewController.prewarmConnections](https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller/3752133-prewarmconnections))
|
|
||||||
Future<void> invalidatePrewarmingToken(
|
Future<void> invalidatePrewarmingToken(
|
||||||
PrewarmingToken prewarmingToken) async {
|
PrewarmingToken prewarmingToken) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
@ -581,16 +393,11 @@ class AndroidChromeSafariBrowser extends PlatformChromeSafariBrowser
|
|||||||
await _staticChannel.invokeMethod("invalidatePrewarmingToken", args);
|
await _staticChannel.invokeMethod("invalidatePrewarmingToken", args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Returns `true` if the [AndroidChromeSafariBrowser] instance is opened, otherwise `false`.
|
@override
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android
|
|
||||||
///- iOS
|
|
||||||
bool isOpened() {
|
bool isOpened() {
|
||||||
return _isOpened;
|
return _isOpened;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Disposes the channel.
|
|
||||||
@override
|
@override
|
||||||
@mustCallSuper
|
@mustCallSuper
|
||||||
void dispose() {
|
void dispose() {
|
||||||
|
@ -30,19 +30,7 @@ class AndroidCookieManagerCreationParams
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///Class that implements a singleton object (shared instance) which manages the cookies used by WebView instances.
|
///{@macro flutter_inappwebview_platform_interface.PlatformCookieManager}
|
||||||
///On Android, it is implemented using [CookieManager](https://developer.android.com/reference/android/webkit/CookieManager).
|
|
||||||
///On iOS, it is implemented using [WKHTTPCookieStore](https://developer.apple.com/documentation/webkit/wkhttpcookiestore).
|
|
||||||
///
|
|
||||||
///**NOTE for iOS below 11.0 and Web platform (LIMITED SUPPORT!)**: in this case, almost all of the methods ([AndroidCookieManager.deleteAllCookies] and [AndroidCookieManager.getAllCookies] are not supported!)
|
|
||||||
///has been implemented using JavaScript because there is no other way to work with them on iOS below 11.0.
|
|
||||||
///See https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies for JavaScript restrictions.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- MacOS
|
|
||||||
///- Web
|
|
||||||
class AndroidCookieManager extends PlatformCookieManager
|
class AndroidCookieManager extends PlatformCookieManager
|
||||||
with ChannelController {
|
with ChannelController {
|
||||||
/// Creates a new [AndroidCookieManager].
|
/// Creates a new [AndroidCookieManager].
|
||||||
@ -74,29 +62,6 @@ class AndroidCookieManager extends PlatformCookieManager
|
|||||||
|
|
||||||
Future<dynamic> _handleMethod(MethodCall call) async {}
|
Future<dynamic> _handleMethod(MethodCall call) async {}
|
||||||
|
|
||||||
///Sets a cookie for the given [url]. Any existing cookie with the same [host], [path] and [name] will be replaced with the new cookie.
|
|
||||||
///The cookie being set will be ignored if it is expired.
|
|
||||||
///
|
|
||||||
///The default value of [path] is `"/"`.
|
|
||||||
///
|
|
||||||
///[webViewController] could be used if you need to set a session-only cookie using JavaScript (so [isHttpOnly] cannot be set, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies)
|
|
||||||
///on the current URL of the [WebView] managed by that controller when you need to target iOS below 11, MacOS below 10.13 and Web platform. In this case the [url] parameter is ignored.
|
|
||||||
///
|
|
||||||
///The return value indicates whether the cookie was set successfully.
|
|
||||||
///Note that it will return always `true` for Web platform, iOS below 11.0 and MacOS below 10.13.
|
|
||||||
///
|
|
||||||
///**NOTE for iOS below 11.0 and MacOS below 10.13**: If [webViewController] is `null` or JavaScript is disabled for it, it will try to use a [AndroidHeadlessInAppWebView]
|
|
||||||
///to set the cookie (session-only cookie won't work! In that case, you should set also [expiresDate] or [maxAge]).
|
|
||||||
///
|
|
||||||
///**NOTE for Web**: this method will have effect only if the iframe has the same origin.
|
|
||||||
///If [webViewController] is `null` or JavaScript is disabled for it, it will try to use a [AndroidHeadlessInAppWebView]
|
|
||||||
///to set the cookie (session-only cookie won't work! In that case, you should set also [expiresDate] or [maxAge]).
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView ([Official API - CookieManager.setCookie](https://developer.android.com/reference/android/webkit/CookieManager#setCookie(java.lang.String,%20java.lang.String,%20android.webkit.ValueCallback%3Cjava.lang.Boolean%3E)))
|
|
||||||
///- iOS ([Official API - WKHTTPCookieStore.setCookie](https://developer.apple.com/documentation/webkit/wkhttpcookiestore/2882007-setcookie))
|
|
||||||
///- MacOS ([Official API - WKHTTPCookieStore.setCookie](https://developer.apple.com/documentation/webkit/wkhttpcookiestore/2882007-setcookie))
|
|
||||||
///- Web
|
|
||||||
@override
|
@override
|
||||||
Future<bool> setCookie(
|
Future<bool> setCookie(
|
||||||
{required WebUri url,
|
{required WebUri url,
|
||||||
@ -200,25 +165,6 @@ class AndroidCookieManager extends PlatformCookieManager
|
|||||||
await headlessWebView.dispose();
|
await headlessWebView.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
///Gets all the cookies for the given [url].
|
|
||||||
///
|
|
||||||
///[webViewController] is used for getting the cookies (also session-only cookies) using JavaScript (cookies with `isHttpOnly` enabled cannot be found, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies)
|
|
||||||
///from the current context of the [WebView] managed by that controller when you need to target iOS below 11, MacOS below 10.13 and Web platform. JavaScript must be enabled in order to work.
|
|
||||||
///In this case the [url] parameter is ignored.
|
|
||||||
///
|
|
||||||
///**NOTE for iOS below 11.0 and MacOS below 10.13**: All the cookies returned this way will have all the properties to `null` except for [Cookie.name] and [Cookie.value].
|
|
||||||
///If [webViewController] is `null` or JavaScript is disabled for it, it will try to use a [AndroidHeadlessInAppWebView]
|
|
||||||
///to get the cookies (session-only cookies and cookies with `isHttpOnly` enabled won't be found!).
|
|
||||||
///
|
|
||||||
///**NOTE for Web**: this method will have effect only if the iframe has the same origin.
|
|
||||||
///If [webViewController] is `null` or JavaScript is disabled for it, it will try to use a [AndroidHeadlessInAppWebView]
|
|
||||||
///to get the cookies (session-only cookies and cookies with `isHttpOnly` enabled won't be found!).
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView ([Official API - CookieManager.getCookie](https://developer.android.com/reference/android/webkit/CookieManager#getCookie(java.lang.String)))
|
|
||||||
///- iOS ([Official API - WKHTTPCookieStore.getAllCookies](https://developer.apple.com/documentation/webkit/wkhttpcookiestore/2882005-getallcookies))
|
|
||||||
///- MacOS ([Official API - WKHTTPCookieStore.getAllCookies](https://developer.apple.com/documentation/webkit/wkhttpcookiestore/2882005-getallcookies))
|
|
||||||
///- Web
|
|
||||||
@override
|
@override
|
||||||
Future<List<Cookie>> getCookies(
|
Future<List<Cookie>> getCookies(
|
||||||
{required WebUri url,
|
{required WebUri url,
|
||||||
@ -316,25 +262,6 @@ class AndroidCookieManager extends PlatformCookieManager
|
|||||||
return cookies;
|
return cookies;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Gets a cookie by its [name] for the given [url].
|
|
||||||
///
|
|
||||||
///[webViewController] is used for getting the cookie (also session-only cookie) using JavaScript (cookie with `isHttpOnly` enabled cannot be found, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies)
|
|
||||||
///from the current context of the [WebView] managed by that controller when you need to target iOS below 11, MacOS below 10.13 and Web platform. JavaScript must be enabled in order to work.
|
|
||||||
///In this case the [url] parameter is ignored.
|
|
||||||
///
|
|
||||||
///**NOTE for iOS below 11.0 and MacOS below 10.13**: All the cookies returned this way will have all the properties to `null` except for [Cookie.name] and [Cookie.value].
|
|
||||||
///If [webViewController] is `null` or JavaScript is disabled for it, it will try to use a [AndroidHeadlessInAppWebView]
|
|
||||||
///to get the cookie (session-only cookie and cookie with `isHttpOnly` enabled won't be found!).
|
|
||||||
///
|
|
||||||
///**NOTE for Web**: this method will have effect only if the iframe has the same origin.
|
|
||||||
///If [webViewController] is `null` or JavaScript is disabled for it, it will try to use a [AndroidHeadlessInAppWebView]
|
|
||||||
///to get the cookie (session-only cookie and cookie with `isHttpOnly` enabled won't be found!).
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- MacOS
|
|
||||||
///- Web
|
|
||||||
@override
|
@override
|
||||||
Future<Cookie?> getCookie(
|
Future<Cookie?> getCookie(
|
||||||
{required WebUri url,
|
{required WebUri url,
|
||||||
@ -378,26 +305,6 @@ class AndroidCookieManager extends PlatformCookieManager
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Removes a cookie by its [name] for the given [url], [domain] and [path].
|
|
||||||
///
|
|
||||||
///The default value of [path] is `"/"`.
|
|
||||||
///
|
|
||||||
///[webViewController] is used for deleting the cookie (also session-only cookie) using JavaScript (cookie with `isHttpOnly` enabled cannot be deleted, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies)
|
|
||||||
///from the current context of the [WebView] managed by that controller when you need to target iOS below 11, MacOS below 10.13 and Web platform. JavaScript must be enabled in order to work.
|
|
||||||
///In this case the [url] parameter is ignored.
|
|
||||||
///
|
|
||||||
///**NOTE for iOS below 11.0 and MacOS below 10.13**: If [webViewController] is `null` or JavaScript is disabled for it, it will try to use a [AndroidHeadlessInAppWebView]
|
|
||||||
///to delete the cookie (session-only cookie and cookie with `isHttpOnly` enabled won't be deleted!).
|
|
||||||
///
|
|
||||||
///**NOTE for Web**: this method will have effect only if the iframe has the same origin.
|
|
||||||
///If [webViewController] is `null` or JavaScript is disabled for it, it will try to use a [AndroidHeadlessInAppWebView]
|
|
||||||
///to delete the cookie (session-only cookie and cookie with `isHttpOnly` enabled won't be deleted!).
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS ([Official API - WKHTTPCookieStore.delete](https://developer.apple.com/documentation/webkit/wkhttpcookiestore/2882009-delete)
|
|
||||||
///- MacOS ([Official API - WKHTTPCookieStore.delete](https://developer.apple.com/documentation/webkit/wkhttpcookiestore/2882009-delete)
|
|
||||||
///- Web
|
|
||||||
@override
|
@override
|
||||||
Future<void> deleteCookie(
|
Future<void> deleteCookie(
|
||||||
{required WebUri url,
|
{required WebUri url,
|
||||||
@ -432,26 +339,6 @@ class AndroidCookieManager extends PlatformCookieManager
|
|||||||
await channel?.invokeMethod('deleteCookie', args);
|
await channel?.invokeMethod('deleteCookie', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Removes all cookies for the given [url], [domain] and [path].
|
|
||||||
///
|
|
||||||
///The default value of [path] is `"/"`.
|
|
||||||
///
|
|
||||||
///[webViewController] is used for deleting the cookies (also session-only cookies) using JavaScript (cookies with `isHttpOnly` enabled cannot be deleted, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies)
|
|
||||||
///from the current context of the [WebView] managed by that controller when you need to target iOS below 11, MacOS below 10.13 and Web platform. JavaScript must be enabled in order to work.
|
|
||||||
///In this case the [url] parameter is ignored.
|
|
||||||
///
|
|
||||||
///**NOTE for iOS below 11.0 and MacOS below 10.13**: If [webViewController] is `null` or JavaScript is disabled for it, it will try to use a [AndroidHeadlessInAppWebView]
|
|
||||||
///to delete the cookies (session-only cookies and cookies with `isHttpOnly` enabled won't be deleted!).
|
|
||||||
///
|
|
||||||
///**NOTE for Web**: this method will have effect only if the iframe has the same origin.
|
|
||||||
///If [webViewController] is `null` or JavaScript is disabled for it, it will try to use a [AndroidHeadlessInAppWebView]
|
|
||||||
///to delete the cookies (session-only cookies and cookies with `isHttpOnly` enabled won't be deleted!).
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- MacOS
|
|
||||||
///- Web
|
|
||||||
@override
|
@override
|
||||||
Future<void> deleteCookies(
|
Future<void> deleteCookies(
|
||||||
{required WebUri url,
|
{required WebUri url,
|
||||||
@ -487,31 +374,12 @@ class AndroidCookieManager extends PlatformCookieManager
|
|||||||
await channel?.invokeMethod('deleteCookies', args);
|
await channel?.invokeMethod('deleteCookies', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Removes all cookies.
|
|
||||||
///
|
|
||||||
///**NOTE for iOS**: available from iOS 11.0+.
|
|
||||||
///
|
|
||||||
///**NOTE for MacOS**: available from iOS 10.13+.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView ([Official API - CookieManager.removeAllCookies](https://developer.android.com/reference/android/webkit/CookieManager#removeAllCookies(android.webkit.ValueCallback%3Cjava.lang.Boolean%3E)))
|
|
||||||
///- iOS ([Official API - WKWebsiteDataStore.removeData](https://developer.apple.com/documentation/webkit/wkwebsitedatastore/1532938-removedata))
|
|
||||||
///- MacOS ([Official API - WKWebsiteDataStore.removeData](https://developer.apple.com/documentation/webkit/wkwebsitedatastore/1532938-removedata))
|
|
||||||
@override
|
@override
|
||||||
Future<void> deleteAllCookies() async {
|
Future<void> deleteAllCookies() async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
await channel?.invokeMethod('deleteAllCookies', args);
|
await channel?.invokeMethod('deleteAllCookies', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Fetches all stored cookies.
|
|
||||||
///
|
|
||||||
///**NOTE for iOS**: available on iOS 11.0+.
|
|
||||||
///
|
|
||||||
///**NOTE for MacOS**: available from iOS 10.13+.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- iOS ([Official API - WKHTTPCookieStore.getAllCookies](https://developer.apple.com/documentation/webkit/wkhttpcookiestore/2882005-getallcookies))
|
|
||||||
///- MacOS ([Official API - WKHTTPCookieStore.getAllCookies](https://developer.apple.com/documentation/webkit/wkhttpcookiestore/2882005-getallcookies))
|
|
||||||
@override
|
@override
|
||||||
Future<List<Cookie>> getAllCookies() async {
|
Future<List<Cookie>> getAllCookies() async {
|
||||||
List<Cookie> cookies = [];
|
List<Cookie> cookies = [];
|
||||||
|
@ -24,10 +24,7 @@ class AndroidFindInteractionControllerCreationParams
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///**Supported Platforms/Implementations**:
|
///{@macro flutter_inappwebview_platform_interface.PlatformFindInteractionController}
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- MacOS
|
|
||||||
class AndroidFindInteractionController extends PlatformFindInteractionController
|
class AndroidFindInteractionController extends PlatformFindInteractionController
|
||||||
with ChannelController {
|
with ChannelController {
|
||||||
/// Constructs a [AndroidFindInteractionController].
|
/// Constructs a [AndroidFindInteractionController].
|
||||||
@ -68,138 +65,64 @@ class AndroidFindInteractionController extends PlatformFindInteractionController
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Finds all instances of find on the page and highlights them. Notifies [AndroidFindInteractionController.onFindResultReceived] listener.
|
///{@macro flutter_inappwebview_platform_interface.PlatformFindInteractionController.findAll}
|
||||||
///
|
|
||||||
///[find] represents the string to find.
|
|
||||||
///
|
|
||||||
///**NOTE**: on Android native WebView, it finds all instances asynchronously. Successive calls to this will cancel any pending searches.
|
|
||||||
///
|
|
||||||
///**NOTE**: on iOS, if [InAppWebViewSettings.isFindInteractionEnabled] is `true`,
|
|
||||||
///it uses the built-in find interaction native UI,
|
|
||||||
///otherwise this is implemented using CSS and Javascript.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView ([Official API - WebView.findAllAsync](https://developer.android.com/reference/android/webkit/WebView#findAllAsync(java.lang.String)))
|
|
||||||
///- iOS (if [InAppWebViewSettings.isFindInteractionEnabled] is `true`: [Official API - UIFindInteraction.presentFindNavigator](https://developer.apple.com/documentation/uikit/uifindinteraction/3975832-presentfindnavigator?changes=_2) with [Official API - UIFindInteraction.searchText](https://developer.apple.com/documentation/uikit/uifindinteraction/3975834-searchtext?changes=_2))
|
|
||||||
///- MacOS
|
|
||||||
Future<void> findAll({String? find}) async {
|
Future<void> findAll({String? find}) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
args.putIfAbsent('find', () => find);
|
args.putIfAbsent('find', () => find);
|
||||||
await channel?.invokeMethod('findAll', args);
|
await channel?.invokeMethod('findAll', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Highlights and scrolls to the next match found by [findAll]. Notifies [AndroidFindInteractionController.onFindResultReceived] listener.
|
///{@macro flutter_inappwebview_platform_interface.PlatformFindInteractionController.findNext}
|
||||||
///
|
|
||||||
///[forward] represents the direction to search. The default value is `true`, meaning forward.
|
|
||||||
///
|
|
||||||
///**NOTE**: on iOS, if [InAppWebViewSettings.isFindInteractionEnabled] is `true`,
|
|
||||||
///it uses the built-in find interaction native UI,
|
|
||||||
///otherwise this is implemented using CSS and Javascript.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView ([Official API - WebView.findNext](https://developer.android.com/reference/android/webkit/WebView#findNext(boolean)))
|
|
||||||
///- iOS (if [InAppWebViewSettings.isFindInteractionEnabled] is `true`: [Official API - UIFindInteraction.findNext](https://developer.apple.com/documentation/uikit/uifindinteraction/3975829-findnext?changes=_2) and ([Official API - UIFindInteraction.findPrevious](https://developer.apple.com/documentation/uikit/uifindinteraction/3975830-findprevious?changes=_2)))
|
|
||||||
///- MacOS
|
|
||||||
Future<void> findNext({bool forward = true}) async {
|
Future<void> findNext({bool forward = true}) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
args.putIfAbsent('forward', () => forward);
|
args.putIfAbsent('forward', () => forward);
|
||||||
await channel?.invokeMethod('findNext', args);
|
await channel?.invokeMethod('findNext', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Clears the highlighting surrounding text matches created by [findAll].
|
///{@macro flutter_inappwebview_platform_interface.PlatformFindInteractionController.clearMatches}
|
||||||
///
|
|
||||||
///**NOTE**: on iOS, if [InAppWebViewSettings.isFindInteractionEnabled] is `true`,
|
|
||||||
///it uses the built-in find interaction native UI,
|
|
||||||
///otherwise this is implemented using CSS and Javascript.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView ([Official API - WebView.clearMatches](https://developer.android.com/reference/android/webkit/WebView#clearMatches()))
|
|
||||||
///- iOS (if [InAppWebViewSettings.isFindInteractionEnabled] is `true`: [Official API - UIFindInteraction.dismissFindNavigator](https://developer.apple.com/documentation/uikit/uifindinteraction/3975827-dismissfindnavigator?changes=_2))
|
|
||||||
///- MacOS
|
|
||||||
Future<void> clearMatches() async {
|
Future<void> clearMatches() async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
await channel?.invokeMethod('clearMatches', args);
|
await channel?.invokeMethod('clearMatches', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Pre-populate the search text to be used.
|
///{@macro flutter_inappwebview_platform_interface.PlatformFindInteractionController.setSearchText}
|
||||||
///
|
|
||||||
///On iOS, if [InAppWebViewSettings.isFindInteractionEnabled] is `true,
|
|
||||||
///it will pre-populate the system find panel's search text field with a search query.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS ([Official API - UIFindInteraction.searchText](https://developer.apple.com/documentation/uikit/uifindinteraction/3975834-searchtext?changes=_2))
|
|
||||||
///- MacOS
|
|
||||||
Future<void> setSearchText(String? searchText) async {
|
Future<void> setSearchText(String? searchText) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
args.putIfAbsent('searchText', () => searchText);
|
args.putIfAbsent('searchText', () => searchText);
|
||||||
await channel?.invokeMethod('setSearchText', args);
|
await channel?.invokeMethod('setSearchText', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Get the search text used.
|
///{@macro flutter_inappwebview_platform_interface.PlatformFindInteractionController.getSearchText}
|
||||||
///
|
|
||||||
///On iOS, if [InAppWebViewSettings.isFindInteractionEnabled] is `true,
|
|
||||||
///it will get the system find panel's search text field value.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS ([Official API - UIFindInteraction.searchText](https://developer.apple.com/documentation/uikit/uifindinteraction/3975834-searchtext?changes=_2))
|
|
||||||
///- MacOS
|
|
||||||
Future<String?> getSearchText() async {
|
Future<String?> getSearchText() async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
return await channel?.invokeMethod<String?>('getSearchText', args);
|
return await channel?.invokeMethod<String?>('getSearchText', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///A Boolean value that indicates when the find panel displays onscreen.
|
///{@macro flutter_inappwebview_platform_interface.PlatformFindInteractionController.isFindNavigatorVisible}
|
||||||
///
|
|
||||||
///**NOTE**: available only on iOS and only if [InAppWebViewSettings.isFindInteractionEnabled] is `true`.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- iOS ([Official API - UIFindInteraction.isFindNavigatorVisible](https://developer.apple.com/documentation/uikit/uifindinteraction/3975828-isfindnavigatorvisible?changes=_2))
|
|
||||||
Future<bool?> isFindNavigatorVisible() async {
|
Future<bool?> isFindNavigatorVisible() async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
return await channel?.invokeMethod<bool?>('isFindNavigatorVisible', args);
|
return await channel?.invokeMethod<bool?>('isFindNavigatorVisible', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Updates the results the interface displays for the active search.
|
///{@macro flutter_inappwebview_platform_interface.PlatformFindInteractionController.updateResultCount}
|
||||||
///
|
|
||||||
///**NOTE**: available only on iOS and only if [InAppWebViewSettings.isFindInteractionEnabled] is `true`.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- iOS ([Official API - UIFindInteraction.updateResultCount](https://developer.apple.com/documentation/uikit/uifindinteraction/3975835-updateresultcount?changes=_2))
|
|
||||||
Future<void> updateResultCount() async {
|
Future<void> updateResultCount() async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
await channel?.invokeMethod('updateResultCount', args);
|
await channel?.invokeMethod('updateResultCount', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Begins a search, displaying the find panel.
|
///{@macro flutter_inappwebview_platform_interface.PlatformFindInteractionController.presentFindNavigator}
|
||||||
///
|
|
||||||
///**NOTE**: available only on iOS and only if [InAppWebViewSettings.isFindInteractionEnabled] is `true`.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- iOS ([Official API - UIFindInteraction.presentFindNavigator](https://developer.apple.com/documentation/uikit/uifindinteraction/3975832-presentfindnavigator?changes=_2))
|
|
||||||
Future<void> presentFindNavigator() async {
|
Future<void> presentFindNavigator() async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
await channel?.invokeMethod('presentFindNavigator', args);
|
await channel?.invokeMethod('presentFindNavigator', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Dismisses the find panel, if present.
|
///{@macro flutter_inappwebview_platform_interface.PlatformFindInteractionController.dismissFindNavigator}
|
||||||
///
|
|
||||||
///**NOTE**: available only on iOS and only if [InAppWebViewSettings.isFindInteractionEnabled] is `true`.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- iOS ([Official API - UIFindInteraction.dismissFindNavigator](https://developer.apple.com/documentation/uikit/uifindinteraction/3975827-dismissfindnavigator?changes=_2))
|
|
||||||
Future<void> dismissFindNavigator() async {
|
Future<void> dismissFindNavigator() async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
await channel?.invokeMethod('dismissFindNavigator', args);
|
await channel?.invokeMethod('dismissFindNavigator', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///If there's a currently active find session, returns the active find session.
|
///{@macro flutter_inappwebview_platform_interface.PlatformFindInteractionController.getActiveFindSession}
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS ([Official API - UIFindInteraction.activeFindSession](https://developer.apple.com/documentation/uikit/uifindinteraction/3975825-activefindsession?changes=_7____4_8&language=objc))
|
|
||||||
///- MacOS
|
|
||||||
Future<FindSession?> getActiveFindSession() async {
|
Future<FindSession?> getActiveFindSession() async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
Map<String, dynamic>? result =
|
Map<String, dynamic>? result =
|
||||||
@ -208,7 +131,7 @@ class AndroidFindInteractionController extends PlatformFindInteractionController
|
|||||||
return FindSession.fromMap(result);
|
return FindSession.fromMap(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Disposes the controller.
|
///{@macro flutter_inappwebview_platform_interface.PlatformFindInteractionController.dispose}
|
||||||
@override
|
@override
|
||||||
void dispose({bool isKeepAlive = false}) {
|
void dispose({bool isKeepAlive = false}) {
|
||||||
disposeChannel(removeMethodCallHandler: !isKeepAlive);
|
disposeChannel(removeMethodCallHandler: !isKeepAlive);
|
||||||
|
@ -25,16 +25,7 @@ class AndroidHttpAuthCredentialDatabaseCreationParams
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///Class that implements a singleton object (shared instance) which manages the shared HTTP auth credentials cache.
|
///{@macro flutter_inappwebview_platform_interface.PlatformHttpAuthCredentialDatabase}
|
||||||
///On iOS and MacOS, this class uses the [URLCredentialStorage](https://developer.apple.com/documentation/foundation/urlcredentialstorage) class.
|
|
||||||
///On Android, this class has a custom implementation using `android.database.sqlite.SQLiteDatabase` because
|
|
||||||
///[WebViewDatabase](https://developer.android.com/reference/android/webkit/WebViewDatabase)
|
|
||||||
///doesn't offer the same functionalities as iOS `URLCredentialStorage`.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- MacOS
|
|
||||||
class AndroidHttpAuthCredentialDatabase
|
class AndroidHttpAuthCredentialDatabase
|
||||||
extends PlatformHttpAuthCredentialDatabase with ChannelController {
|
extends PlatformHttpAuthCredentialDatabase with ChannelController {
|
||||||
/// Creates a new [AndroidHttpAuthCredentialDatabase].
|
/// Creates a new [AndroidHttpAuthCredentialDatabase].
|
||||||
@ -68,14 +59,7 @@ class AndroidHttpAuthCredentialDatabase
|
|||||||
|
|
||||||
Future<dynamic> _handleMethod(MethodCall call) async {}
|
Future<dynamic> _handleMethod(MethodCall call) async {}
|
||||||
|
|
||||||
///Gets a map list of all HTTP auth credentials saved.
|
@override
|
||||||
///Each map contains the key `protectionSpace` of type [URLProtectionSpace]
|
|
||||||
///and the key `credentials` of type List<[URLCredential]> that contains all the HTTP auth credentials saved for that `protectionSpace`.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS ([Official API - URLCredentialStorage.allCredentials](https://developer.apple.com/documentation/foundation/urlcredentialstorage/1413859-allcredentials))
|
|
||||||
///- MacOS ([Official API - URLCredentialStorage.allCredentials](https://developer.apple.com/documentation/foundation/urlcredentialstorage/1413859-allcredentials))
|
|
||||||
Future<List<URLProtectionSpaceHttpAuthCredentials>>
|
Future<List<URLProtectionSpaceHttpAuthCredentials>>
|
||||||
getAllAuthCredentials() async {
|
getAllAuthCredentials() async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
@ -94,12 +78,7 @@ class AndroidHttpAuthCredentialDatabase
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Gets all the HTTP auth credentials saved for that [protectionSpace].
|
@override
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- MacOS
|
|
||||||
Future<List<URLCredential>> getHttpAuthCredentials(
|
Future<List<URLCredential>> getHttpAuthCredentials(
|
||||||
{required URLProtectionSpace protectionSpace}) async {
|
{required URLProtectionSpace protectionSpace}) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
@ -119,12 +98,7 @@ class AndroidHttpAuthCredentialDatabase
|
|||||||
return credentials;
|
return credentials;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Saves an HTTP auth [credential] for that [protectionSpace].
|
@override
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS ([Official API - URLCredentialStorage.set](https://developer.apple.com/documentation/foundation/urlcredentialstorage/1407227-set))
|
|
||||||
///- MacOS ([Official API - URLCredentialStorage.set](https://developer.apple.com/documentation/foundation/urlcredentialstorage/1407227-set))
|
|
||||||
Future<void> setHttpAuthCredential(
|
Future<void> setHttpAuthCredential(
|
||||||
{required URLProtectionSpace protectionSpace,
|
{required URLProtectionSpace protectionSpace,
|
||||||
required URLCredential credential}) async {
|
required URLCredential credential}) async {
|
||||||
@ -138,12 +112,7 @@ class AndroidHttpAuthCredentialDatabase
|
|||||||
await channel?.invokeMethod('setHttpAuthCredential', args);
|
await channel?.invokeMethod('setHttpAuthCredential', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Removes an HTTP auth [credential] for that [protectionSpace].
|
@override
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS ([Official API - URLCredentialStorage.remove](https://developer.apple.com/documentation/foundation/urlcredentialstorage/1408664-remove))
|
|
||||||
///- MacOS ([Official API - URLCredentialStorage.remove](https://developer.apple.com/documentation/foundation/urlcredentialstorage/1408664-remove))
|
|
||||||
Future<void> removeHttpAuthCredential(
|
Future<void> removeHttpAuthCredential(
|
||||||
{required URLProtectionSpace protectionSpace,
|
{required URLProtectionSpace protectionSpace,
|
||||||
required URLCredential credential}) async {
|
required URLCredential credential}) async {
|
||||||
@ -157,12 +126,7 @@ class AndroidHttpAuthCredentialDatabase
|
|||||||
await channel?.invokeMethod('removeHttpAuthCredential', args);
|
await channel?.invokeMethod('removeHttpAuthCredential', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Removes all the HTTP auth credentials saved for that [protectionSpace].
|
@override
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- MacOS
|
|
||||||
Future<void> removeHttpAuthCredentials(
|
Future<void> removeHttpAuthCredentials(
|
||||||
{required URLProtectionSpace protectionSpace}) async {
|
{required URLProtectionSpace protectionSpace}) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
@ -173,12 +137,7 @@ class AndroidHttpAuthCredentialDatabase
|
|||||||
await channel?.invokeMethod('removeHttpAuthCredentials', args);
|
await channel?.invokeMethod('removeHttpAuthCredentials', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Removes all the HTTP auth credentials saved in the database.
|
@override
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- MacOS
|
|
||||||
Future<void> clearAllAuthCredentials() async {
|
Future<void> clearAllAuthCredentials() async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
await channel?.invokeMethod('clearAllAuthCredentials', args);
|
await channel?.invokeMethod('clearAllAuthCredentials', args);
|
||||||
|
@ -46,15 +46,9 @@ class AndroidInAppBrowserCreationParams
|
|||||||
final AndroidPullToRefreshController? pullToRefreshController;
|
final AndroidPullToRefreshController? pullToRefreshController;
|
||||||
}
|
}
|
||||||
|
|
||||||
///This class uses the native WebView of the platform.
|
///{@macro flutter_inappwebview_platform_interface.PlatformInAppBrowser}
|
||||||
///The [webViewController] field can be used to access the [InAppWebViewController] API.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- MacOS
|
|
||||||
class AndroidInAppBrowser extends PlatformInAppBrowser with ChannelController {
|
class AndroidInAppBrowser extends PlatformInAppBrowser with ChannelController {
|
||||||
///View ID used internally.
|
@override
|
||||||
final String id = IdGenerator.generate();
|
final String id = IdGenerator.generate();
|
||||||
|
|
||||||
/// Constructs a [AndroidInAppBrowser].
|
/// Constructs a [AndroidInAppBrowser].
|
||||||
@ -71,6 +65,7 @@ class AndroidInAppBrowser extends PlatformInAppBrowser with ChannelController {
|
|||||||
static final AndroidInAppBrowser _staticValue =
|
static final AndroidInAppBrowser _staticValue =
|
||||||
AndroidInAppBrowser(AndroidInAppBrowserCreationParams());
|
AndroidInAppBrowser(AndroidInAppBrowserCreationParams());
|
||||||
|
|
||||||
|
/// Provide static access.
|
||||||
factory AndroidInAppBrowser.static() {
|
factory AndroidInAppBrowser.static() {
|
||||||
return _staticValue;
|
return _staticValue;
|
||||||
}
|
}
|
||||||
@ -83,14 +78,14 @@ class AndroidInAppBrowser extends PlatformInAppBrowser with ChannelController {
|
|||||||
|
|
||||||
ContextMenu? _contextMenu;
|
ContextMenu? _contextMenu;
|
||||||
|
|
||||||
|
@override
|
||||||
ContextMenu? get contextMenu => _contextMenu;
|
ContextMenu? get contextMenu => _contextMenu;
|
||||||
|
|
||||||
Map<int, InAppBrowserMenuItem> _menuItems = HashMap();
|
Map<int, InAppBrowserMenuItem> _menuItems = HashMap();
|
||||||
bool _isOpened = false;
|
bool _isOpened = false;
|
||||||
AndroidInAppWebViewController? _webViewController;
|
AndroidInAppWebViewController? _webViewController;
|
||||||
|
|
||||||
///WebView Controller that can be used to access the [AndroidInAppWebViewController] API.
|
@override
|
||||||
///When [onExit] is fired, this will be `null` and cannot be used anymore.
|
|
||||||
AndroidInAppWebViewController? get webViewController {
|
AndroidInAppWebViewController? get webViewController {
|
||||||
return _isOpened ? _webViewController : null;
|
return _isOpened ? _webViewController : null;
|
||||||
}
|
}
|
||||||
@ -177,18 +172,7 @@ class AndroidInAppBrowser extends PlatformInAppBrowser with ChannelController {
|
|||||||
return args;
|
return args;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Opens the [PlatformInAppBrowser] instance with an [urlRequest].
|
@override
|
||||||
///
|
|
||||||
///[urlRequest]: The [urlRequest] to load.
|
|
||||||
///
|
|
||||||
///[options]: Options for the [PlatformInAppBrowser].
|
|
||||||
///
|
|
||||||
///[settings]: Settings for the [PlatformInAppBrowser].
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- MacOS
|
|
||||||
Future<void> openUrlRequest(
|
Future<void> openUrlRequest(
|
||||||
{required URLRequest urlRequest,
|
{required URLRequest urlRequest,
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
@ -202,48 +186,7 @@ class AndroidInAppBrowser extends PlatformInAppBrowser with ChannelController {
|
|||||||
await _staticChannel.invokeMethod('open', args);
|
await _staticChannel.invokeMethod('open', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Opens the [PlatformInAppBrowser] instance with the given [assetFilePath] file.
|
@override
|
||||||
///
|
|
||||||
///[options]: Options for the [PlatformInAppBrowser].
|
|
||||||
///
|
|
||||||
///To be able to load your local files (assets, js, css, etc.), you need to add them in the `assets` section of the `pubspec.yaml` file, otherwise they cannot be found!
|
|
||||||
///
|
|
||||||
///Example of a `pubspec.yaml` file:
|
|
||||||
///```yaml
|
|
||||||
///...
|
|
||||||
///
|
|
||||||
///# The following section is specific to Flutter.
|
|
||||||
///flutter:
|
|
||||||
///
|
|
||||||
/// # The following line ensures that the Material Icons font is
|
|
||||||
/// # included with your application, so that you can use the icons in
|
|
||||||
/// # the material Icons class.
|
|
||||||
/// uses-material-design: true
|
|
||||||
///
|
|
||||||
/// assets:
|
|
||||||
/// - assets/index.html
|
|
||||||
/// - assets/css/
|
|
||||||
/// - assets/images/
|
|
||||||
///
|
|
||||||
///...
|
|
||||||
///```
|
|
||||||
///Example of a `main.dart` file:
|
|
||||||
///```dart
|
|
||||||
///...
|
|
||||||
///inAppBrowser.openFile(assetFilePath: "assets/index.html");
|
|
||||||
///...
|
|
||||||
///```
|
|
||||||
///
|
|
||||||
///[headers]: The additional headers to be used in the HTTP request for this URL, specified as a map from name to value.
|
|
||||||
///
|
|
||||||
///[options]: Options for the [PlatformInAppBrowser].
|
|
||||||
///
|
|
||||||
///[settings]: Settings for the [PlatformInAppBrowser].
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- MacOS
|
|
||||||
Future<void> openFile(
|
Future<void> openFile(
|
||||||
{required String assetFilePath,
|
{required String assetFilePath,
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
@ -257,22 +200,7 @@ class AndroidInAppBrowser extends PlatformInAppBrowser with ChannelController {
|
|||||||
await _staticChannel.invokeMethod('open', args);
|
await _staticChannel.invokeMethod('open', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Opens the [PlatformInAppBrowser] instance with [data] as a content, using [baseUrl] as the base URL for it.
|
@override
|
||||||
///
|
|
||||||
///The [mimeType] parameter specifies the format of the data. The default value is `"text/html"`.
|
|
||||||
///
|
|
||||||
///The [encoding] parameter specifies the encoding of the data. The default value is `"utf8"`.
|
|
||||||
///
|
|
||||||
///The [androidHistoryUrl] parameter is the URL to use as the history entry. The default value is `about:blank`. If non-null, this must be a valid URL. This parameter is used only on Android.
|
|
||||||
///
|
|
||||||
///The [options] parameter specifies the options for the [PlatformInAppBrowser].
|
|
||||||
///
|
|
||||||
///[settings]: Settings for the [PlatformInAppBrowser].
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- MacOS
|
|
||||||
Future<void> openData(
|
Future<void> openData(
|
||||||
{required String data,
|
{required String data,
|
||||||
String mimeType = "text/html",
|
String mimeType = "text/html",
|
||||||
@ -294,12 +222,7 @@ class AndroidInAppBrowser extends PlatformInAppBrowser with ChannelController {
|
|||||||
await _staticChannel.invokeMethod('open', args);
|
await _staticChannel.invokeMethod('open', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///This is a static method that opens an [url] in the system browser. You wont be able to use the [PlatformInAppBrowser] methods here!
|
@override
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- MacOS
|
|
||||||
Future<void> openWithSystemBrowser({required WebUri url}) async {
|
Future<void> openWithSystemBrowser({required WebUri url}) async {
|
||||||
assert(url.toString().isNotEmpty);
|
assert(url.toString().isNotEmpty);
|
||||||
|
|
||||||
@ -308,81 +231,41 @@ class AndroidInAppBrowser extends PlatformInAppBrowser with ChannelController {
|
|||||||
return await _staticChannel.invokeMethod('openWithSystemBrowser', args);
|
return await _staticChannel.invokeMethod('openWithSystemBrowser', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Adds a [InAppBrowserMenuItem] to the menu.
|
@override
|
||||||
///If the browser is already open,
|
|
||||||
///it will take effect the next time it is opened.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android
|
|
||||||
///- iOS 14.0+
|
|
||||||
void addMenuItem(InAppBrowserMenuItem menuItem) {
|
void addMenuItem(InAppBrowserMenuItem menuItem) {
|
||||||
_menuItems[menuItem.id] = menuItem;
|
_menuItems[menuItem.id] = menuItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Adds a list of [InAppBrowserMenuItem] to the menu.
|
@override
|
||||||
///If the browser is already open,
|
|
||||||
///it will take effect the next time it is opened.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android
|
|
||||||
///- iOS 14.0+
|
|
||||||
void addMenuItems(List<InAppBrowserMenuItem> menuItems) {
|
void addMenuItems(List<InAppBrowserMenuItem> menuItems) {
|
||||||
menuItems.forEach((menuItem) {
|
menuItems.forEach((menuItem) {
|
||||||
_menuItems[menuItem.id] = menuItem;
|
_menuItems[menuItem.id] = menuItem;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
///Removes the [menuItem] from the list.
|
@override
|
||||||
///Returns `true` if it was in the list, `false` otherwise.
|
|
||||||
///If the browser is already open,
|
|
||||||
///it will take effect the next time it is opened.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android
|
|
||||||
///- iOS 14.0+
|
|
||||||
bool removeMenuItem(InAppBrowserMenuItem menuItem) {
|
bool removeMenuItem(InAppBrowserMenuItem menuItem) {
|
||||||
return _menuItems.remove(menuItem.id) != null;
|
return _menuItems.remove(menuItem.id) != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Removes a list of [menuItems] from the list.
|
@override
|
||||||
///If the browser is already open,
|
|
||||||
///it will take effect the next time it is opened.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android
|
|
||||||
///- iOS 14.0+
|
|
||||||
void removeMenuItems(List<InAppBrowserMenuItem> menuItems) {
|
void removeMenuItems(List<InAppBrowserMenuItem> menuItems) {
|
||||||
for (final menuItem in menuItems) {
|
for (final menuItem in menuItems) {
|
||||||
removeMenuItem(menuItem);
|
removeMenuItem(menuItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///Removes all the menu items from the list.
|
@override
|
||||||
///If the browser is already open,
|
|
||||||
///it will take effect the next time it is opened.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android
|
|
||||||
///- iOS 14.0+
|
|
||||||
void removeAllMenuItem() {
|
void removeAllMenuItem() {
|
||||||
_menuItems.clear();
|
_menuItems.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
///Returns `true` if the [menuItem] has been already added, otherwise `false`.
|
@override
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS 14.0+
|
|
||||||
bool hasMenuItem(InAppBrowserMenuItem menuItem) {
|
bool hasMenuItem(InAppBrowserMenuItem menuItem) {
|
||||||
return _menuItems.containsKey(menuItem.id);
|
return _menuItems.containsKey(menuItem.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Displays an [PlatformInAppBrowser] window that was opened hidden. Calling this has no effect if the [PlatformInAppBrowser] was already visible.
|
@override
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- MacOS
|
|
||||||
Future<void> show() async {
|
Future<void> show() async {
|
||||||
assert(_isOpened, 'The browser is not opened.');
|
assert(_isOpened, 'The browser is not opened.');
|
||||||
|
|
||||||
@ -390,12 +273,7 @@ class AndroidInAppBrowser extends PlatformInAppBrowser with ChannelController {
|
|||||||
await channel?.invokeMethod('show', args);
|
await channel?.invokeMethod('show', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Hides the [PlatformInAppBrowser] window. Calling this has no effect if the [PlatformInAppBrowser] was already hidden.
|
@override
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- MacOS
|
|
||||||
Future<void> hide() async {
|
Future<void> hide() async {
|
||||||
assert(_isOpened, 'The browser is not opened.');
|
assert(_isOpened, 'The browser is not opened.');
|
||||||
|
|
||||||
@ -403,12 +281,7 @@ class AndroidInAppBrowser extends PlatformInAppBrowser with ChannelController {
|
|||||||
await channel?.invokeMethod('hide', args);
|
await channel?.invokeMethod('hide', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Closes the [PlatformInAppBrowser] window.
|
@override
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- MacOS
|
|
||||||
Future<void> close() async {
|
Future<void> close() async {
|
||||||
assert(_isOpened, 'The browser is not opened.');
|
assert(_isOpened, 'The browser is not opened.');
|
||||||
|
|
||||||
@ -416,12 +289,7 @@ class AndroidInAppBrowser extends PlatformInAppBrowser with ChannelController {
|
|||||||
await channel?.invokeMethod('close', args);
|
await channel?.invokeMethod('close', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Check if the Web View of the [PlatformInAppBrowser] instance is hidden.
|
@override
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- MacOS
|
|
||||||
Future<bool> isHidden() async {
|
Future<bool> isHidden() async {
|
||||||
assert(_isOpened, 'The browser is not opened.');
|
assert(_isOpened, 'The browser is not opened.');
|
||||||
|
|
||||||
@ -429,7 +297,7 @@ class AndroidInAppBrowser extends PlatformInAppBrowser with ChannelController {
|
|||||||
return await channel?.invokeMethod<bool>('isHidden', args) ?? false;
|
return await channel?.invokeMethod<bool>('isHidden', args) ?? false;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Use [setSettings] instead.
|
@override
|
||||||
@Deprecated('Use setSettings instead')
|
@Deprecated('Use setSettings instead')
|
||||||
Future<void> setOptions({required InAppBrowserClassOptions options}) async {
|
Future<void> setOptions({required InAppBrowserClassOptions options}) async {
|
||||||
assert(_isOpened, 'The browser is not opened.');
|
assert(_isOpened, 'The browser is not opened.');
|
||||||
@ -439,7 +307,7 @@ class AndroidInAppBrowser extends PlatformInAppBrowser with ChannelController {
|
|||||||
await channel?.invokeMethod('setSettings', args);
|
await channel?.invokeMethod('setSettings', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Use [getSettings] instead.
|
@override
|
||||||
@Deprecated('Use getSettings instead')
|
@Deprecated('Use getSettings instead')
|
||||||
Future<InAppBrowserClassOptions?> getOptions() async {
|
Future<InAppBrowserClassOptions?> getOptions() async {
|
||||||
assert(_isOpened, 'The browser is not opened.');
|
assert(_isOpened, 'The browser is not opened.');
|
||||||
@ -455,12 +323,7 @@ class AndroidInAppBrowser extends PlatformInAppBrowser with ChannelController {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Sets the [PlatformInAppBrowser] settings with the new [settings] and evaluates them.
|
@override
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- MacOS
|
|
||||||
Future<void> setSettings(
|
Future<void> setSettings(
|
||||||
{required InAppBrowserClassSettings settings}) async {
|
{required InAppBrowserClassSettings settings}) async {
|
||||||
assert(_isOpened, 'The browser is not opened.');
|
assert(_isOpened, 'The browser is not opened.');
|
||||||
@ -470,12 +333,7 @@ class AndroidInAppBrowser extends PlatformInAppBrowser with ChannelController {
|
|||||||
await channel?.invokeMethod('setSettings', args);
|
await channel?.invokeMethod('setSettings', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Gets the current [PlatformInAppBrowser] settings. Returns `null` if it wasn't able to get them.
|
@override
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- MacOS
|
|
||||||
Future<InAppBrowserClassSettings?> getSettings() async {
|
Future<InAppBrowserClassSettings?> getSettings() async {
|
||||||
assert(_isOpened, 'The browser is not opened.');
|
assert(_isOpened, 'The browser is not opened.');
|
||||||
|
|
||||||
@ -492,17 +350,11 @@ class AndroidInAppBrowser extends PlatformInAppBrowser with ChannelController {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Returns `true` if the [PlatformInAppBrowser] instance is opened, otherwise `false`.
|
@override
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- MacOS
|
|
||||||
bool isOpened() {
|
bool isOpened() {
|
||||||
return this._isOpened;
|
return this._isOpened;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Disposes the channel and controllers.
|
|
||||||
@override
|
@override
|
||||||
@mustCallSuper
|
@mustCallSuper
|
||||||
void dispose() {
|
void dispose() {
|
||||||
|
@ -249,21 +249,9 @@ class AndroidHeadlessInAppWebViewCreationParams
|
|||||||
final AndroidPullToRefreshController? pullToRefreshController;
|
final AndroidPullToRefreshController? pullToRefreshController;
|
||||||
}
|
}
|
||||||
|
|
||||||
///{@template flutter_inappwebview.HeadlessInAppWebView}
|
///{@macro flutter_inappwebview_platform_interface.PlatformHeadlessInAppWebView}
|
||||||
///Class that represents a WebView in headless mode.
|
|
||||||
///It can be used to run a WebView in background without attaching an `InAppWebView` to the widget tree.
|
|
||||||
///
|
|
||||||
///**NOTE**: Remember to dispose it when you don't need it anymore.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- Web
|
|
||||||
///- MacOS
|
|
||||||
///{@endtemplate}
|
|
||||||
class AndroidHeadlessInAppWebView extends PlatformHeadlessInAppWebView
|
class AndroidHeadlessInAppWebView extends PlatformHeadlessInAppWebView
|
||||||
with ChannelController {
|
with ChannelController {
|
||||||
///View ID.
|
|
||||||
@override
|
@override
|
||||||
late final String id;
|
late final String id;
|
||||||
|
|
||||||
@ -286,7 +274,6 @@ class AndroidHeadlessInAppWebView extends PlatformHeadlessInAppWebView
|
|||||||
id = IdGenerator.generate();
|
id = IdGenerator.generate();
|
||||||
}
|
}
|
||||||
|
|
||||||
///WebView Controller that can be used to access the [InAppWebViewController] API.
|
|
||||||
@override
|
@override
|
||||||
AndroidInAppWebViewController? get webViewController => _webViewController;
|
AndroidInAppWebViewController? get webViewController => _webViewController;
|
||||||
|
|
||||||
@ -324,15 +311,6 @@ class AndroidHeadlessInAppWebView extends PlatformHeadlessInAppWebView
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Runs the headless WebView.
|
|
||||||
///
|
|
||||||
///**NOTE for Web**: it will append a new `iframe` to the body.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- Web
|
|
||||||
///- MacOS
|
|
||||||
Future<void> run() async {
|
Future<void> run() async {
|
||||||
if (_started) {
|
if (_started) {
|
||||||
return;
|
return;
|
||||||
@ -408,32 +386,11 @@ class AndroidHeadlessInAppWebView extends PlatformHeadlessInAppWebView
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///Indicates if the headless WebView is running or not.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- Web
|
|
||||||
///- MacOS
|
|
||||||
@override
|
@override
|
||||||
bool isRunning() {
|
bool isRunning() {
|
||||||
return _running;
|
return _running;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Set the size of the WebView in pixels.
|
|
||||||
///
|
|
||||||
///Set `-1` to match the corresponding width or height of the current device screen size.
|
|
||||||
///`Size(-1, -1)` will match both width and height of the current device screen size.
|
|
||||||
///
|
|
||||||
///Note that if the [AndroidHeadlessInAppWebView] is not running, this method won't have effect.
|
|
||||||
///
|
|
||||||
///**NOTE for Android**: `Size` width and height values will be converted to `int` values because they cannot have `double` values.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- Web
|
|
||||||
///- MacOS
|
|
||||||
@override
|
@override
|
||||||
Future<void> setSize(Size size) async {
|
Future<void> setSize(Size size) async {
|
||||||
if (!_running) {
|
if (!_running) {
|
||||||
@ -445,15 +402,6 @@ class AndroidHeadlessInAppWebView extends PlatformHeadlessInAppWebView
|
|||||||
await channel?.invokeMethod('setSize', args);
|
await channel?.invokeMethod('setSize', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Gets the current size in pixels of the WebView.
|
|
||||||
///
|
|
||||||
///Note that if the [AndroidHeadlessInAppWebView] is not running, this method will return `null`.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- Web
|
|
||||||
///- MacOS
|
|
||||||
@override
|
@override
|
||||||
Future<Size?> getSize() async {
|
Future<Size?> getSize() async {
|
||||||
if (!_running) {
|
if (!_running) {
|
||||||
@ -466,13 +414,6 @@ class AndroidHeadlessInAppWebView extends PlatformHeadlessInAppWebView
|
|||||||
return MapSize.fromMap(sizeMap);
|
return MapSize.fromMap(sizeMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Disposes the headless WebView.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- Web
|
|
||||||
///- MacOS
|
|
||||||
@override
|
@override
|
||||||
Future<void> dispose() async {
|
Future<void> dispose() async {
|
||||||
if (!_running) {
|
if (!_running) {
|
||||||
|
@ -475,7 +475,7 @@ class AndroidInAppWebViewWidget extends PlatformInAppWebViewWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
T controllerFromPlatform<T>(PlatformInAppWebViewController controller) {
|
T controllerFromPlatform<T>(PlatformInAppWebViewController controller) {
|
||||||
// TODO: implement controllerFromPlatform
|
// unused
|
||||||
throw UnimplementedError();
|
throw UnimplementedError();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -24,12 +24,7 @@ class AndroidPrintJobControllerCreationParams
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///Class representing a print job eventually returned by [InAppWebViewController.printCurrentPage].
|
///{@macro flutter_inappwebview_platform_interface.PlatformPrintJobController}
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- MacOS
|
|
||||||
class AndroidPrintJobController extends PlatformPrintJobController
|
class AndroidPrintJobController extends PlatformPrintJobController
|
||||||
with ChannelController {
|
with ChannelController {
|
||||||
/// Constructs a [AndroidPrintJobController].
|
/// Constructs a [AndroidPrintJobController].
|
||||||
@ -60,51 +55,26 @@ class AndroidPrintJobController extends PlatformPrintJobController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///Cancels this print job.
|
@override
|
||||||
///You can request cancellation of a queued, started, blocked, or failed print job.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView ([Official API - PrintJob.cancel](https://developer.android.com/reference/android/print/PrintJob#cancel()))
|
|
||||||
Future<void> cancel() async {
|
Future<void> cancel() async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
await channel?.invokeMethod('cancel', args);
|
await channel?.invokeMethod('cancel', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Restarts this print job.
|
@override
|
||||||
///You can request restart of a failed print job.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView ([Official API - PrintJob.restart](https://developer.android.com/reference/android/print/PrintJob#restart()))
|
|
||||||
Future<void> restart() async {
|
Future<void> restart() async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
await channel?.invokeMethod('restart', args);
|
await channel?.invokeMethod('restart', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Dismisses the printing-options sheet or popover.
|
@override
|
||||||
///
|
|
||||||
///You should dismiss the printing options when they are presented in a sheet or
|
|
||||||
///animated from a rectangle and the user changes the orientation of the device.
|
|
||||||
///(This, of course, assumes your application responds to orientation changes.)
|
|
||||||
///You should then present the printing options again once the new orientation takes effect.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- iOS
|
|
||||||
Future<void> dismiss({bool animated: true}) async {
|
Future<void> dismiss({bool animated: true}) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
args.putIfAbsent("animated", () => animated);
|
args.putIfAbsent("animated", () => animated);
|
||||||
await channel?.invokeMethod('dismiss', args);
|
await channel?.invokeMethod('dismiss', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Gets the [PrintJobInfo] that describes this job.
|
@override
|
||||||
///
|
|
||||||
///**NOTE**: The returned info object is a snapshot of the
|
|
||||||
///current print job state. Every call to this method returns a fresh
|
|
||||||
///info object that reflects the current print job state.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView ([Official API - PrintJob.getInfo](https://developer.android.com/reference/android/print/PrintJob#getInfo()))
|
|
||||||
///- iOS
|
|
||||||
///- MacOS
|
|
||||||
Future<PrintJobInfo?> getInfo() async {
|
Future<PrintJobInfo?> getInfo() async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
Map<String, dynamic>? infoMap =
|
Map<String, dynamic>? infoMap =
|
||||||
@ -112,12 +82,6 @@ class AndroidPrintJobController extends PlatformPrintJobController
|
|||||||
return PrintJobInfo.fromMap(infoMap);
|
return PrintJobInfo.fromMap(infoMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Disposes the print job.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- MacOS
|
|
||||||
@override
|
@override
|
||||||
Future<void> dispose() async {
|
Future<void> dispose() async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
|
@ -25,28 +25,7 @@ class AndroidProcessGlobalConfigCreationParams
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///Process Global Configuration for [WebView].
|
///{@macro flutter_inappwebview_platform_interface.PlatformProcessGlobalConfig}
|
||||||
///WebView has some process-global configuration parameters
|
|
||||||
///that cannot be changed once WebView has been loaded.
|
|
||||||
///This class allows apps to set these parameters.
|
|
||||||
///
|
|
||||||
///If it is used, the configuration should be set and apply should
|
|
||||||
///be called prior to loading WebView into the calling process.
|
|
||||||
///Most of the methods in `android.webkit` and `androidx.webkit` packages load WebView,
|
|
||||||
///so the configuration should be applied before calling any of these methods.
|
|
||||||
///
|
|
||||||
///The following code configures the data directory suffix that WebView uses and
|
|
||||||
///then applies the configuration. WebView uses this configuration when it is loaded.
|
|
||||||
///
|
|
||||||
///[apply] can only be called once.
|
|
||||||
///
|
|
||||||
///Only a single thread should access this class at a given time.
|
|
||||||
///
|
|
||||||
///The configuration should be set up as early as possible during application startup,
|
|
||||||
///to ensure that it happens before any other thread can call a method that loads [WebView].
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView ([Official API - ProcessGlobalConfig](https://developer.android.com/reference/androidx/webkit/ProcessGlobalConfig))
|
|
||||||
class AndroidProcessGlobalConfig extends PlatformProcessGlobalConfig
|
class AndroidProcessGlobalConfig extends PlatformProcessGlobalConfig
|
||||||
with ChannelController {
|
with ChannelController {
|
||||||
/// Creates a new [AndroidProcessGlobalConfig].
|
/// Creates a new [AndroidProcessGlobalConfig].
|
||||||
@ -79,13 +58,7 @@ class AndroidProcessGlobalConfig extends PlatformProcessGlobalConfig
|
|||||||
|
|
||||||
Future<dynamic> _handleMethod(MethodCall call) async {}
|
Future<dynamic> _handleMethod(MethodCall call) async {}
|
||||||
|
|
||||||
///Applies the configuration to be used by [WebView] on loading.
|
@override
|
||||||
///This method can only be called once.
|
|
||||||
///
|
|
||||||
///Calling this method will not cause [WebView] to be loaded and will not block the calling thread.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView ([Official API - ProcessGlobalConfig.apply](https://developer.android.com/reference/androidx/webkit/ProcessGlobalConfig#apply(androidx.webkit.ProcessGlobalConfig)))
|
|
||||||
Future<void> apply({required ProcessGlobalConfigSettings settings}) async {
|
Future<void> apply({required ProcessGlobalConfigSettings settings}) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
args.putIfAbsent("settings", () => settings.toMap());
|
args.putIfAbsent("settings", () => settings.toMap());
|
||||||
|
@ -25,16 +25,7 @@ class AndroidProxyControllerCreationParams
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///Manages setting and clearing a process-specific override for the Android system-wide proxy settings that govern network requests made by [WebView].
|
///{@macro flutter_inappwebview_platform_interface.PlatformProxyController}
|
||||||
///
|
|
||||||
///[WebView] may make network requests in order to fetch content that is not otherwise read from the file system or provided directly by application code.
|
|
||||||
///In this case by default the system-wide Android network proxy settings are used to redirect requests to appropriate proxy servers.
|
|
||||||
///
|
|
||||||
///In the rare case that it is necessary for an application to explicitly specify its proxy configuration,
|
|
||||||
///this API may be used to explicitly specify the proxy rules that govern WebView initiated network requests.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView ([Official API - ProxyController](https://developer.android.com/reference/androidx/webkit/ProxyController))
|
|
||||||
class AndroidProxyController extends PlatformProxyController
|
class AndroidProxyController extends PlatformProxyController
|
||||||
with ChannelController {
|
with ChannelController {
|
||||||
/// Creates a new [AndroidProxyController].
|
/// Creates a new [AndroidProxyController].
|
||||||
@ -66,24 +57,14 @@ class AndroidProxyController extends PlatformProxyController
|
|||||||
|
|
||||||
Future<dynamic> _handleMethod(MethodCall call) async {}
|
Future<dynamic> _handleMethod(MethodCall call) async {}
|
||||||
|
|
||||||
///Sets [ProxySettings] which will be used by all [WebView]s in the app.
|
@override
|
||||||
///URLs that match patterns in the bypass list will not be directed to any proxy.
|
|
||||||
///Instead, the request will be made directly to the origin specified by the URL.
|
|
||||||
///Network connections are not guaranteed to immediately use the new proxy setting; wait for the method to return before loading a page.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView ([Official API - ProxyController.setProxyOverride](https://developer.android.com/reference/androidx/webkit/ProxyController#setProxyOverride(androidx.webkit.ProxyConfig,%20java.util.concurrent.Executor,%20java.lang.Runnable)))
|
|
||||||
Future<void> setProxyOverride({required ProxySettings settings}) async {
|
Future<void> setProxyOverride({required ProxySettings settings}) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
args.putIfAbsent("settings", () => settings.toMap());
|
args.putIfAbsent("settings", () => settings.toMap());
|
||||||
await channel?.invokeMethod('setProxyOverride', args);
|
await channel?.invokeMethod('setProxyOverride', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Clears the proxy settings.
|
@override
|
||||||
///Network connections are not guaranteed to immediately use the new proxy setting; wait for the method to return before loading a page.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView ([Official API - ProxyController.clearProxyOverride](https://developer.android.com/reference/androidx/webkit/ProxyController#clearProxyOverride(java.util.concurrent.Executor,%20java.lang.Runnable)))
|
|
||||||
Future<void> clearProxyOverride() async {
|
Future<void> clearProxyOverride() async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
await channel?.invokeMethod('clearProxyOverride', args);
|
await channel?.invokeMethod('clearProxyOverride', args);
|
||||||
|
@ -26,17 +26,7 @@ class AndroidPullToRefreshControllerCreationParams
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///A standard controller that can initiate the refreshing of a scroll view’s contents.
|
///{@macro flutter_inappwebview_platform_interface.PlatformPullToRefreshController}
|
||||||
///This should be used whenever the user can refresh the contents of a WebView via a vertical swipe gesture.
|
|
||||||
///
|
|
||||||
///All the methods should be called only when the WebView has been created or is already running
|
|
||||||
///(for example [WebView.onWebViewCreated] or [InAppBrowser.onBrowserCreated]).
|
|
||||||
///
|
|
||||||
///**NOTE for Android**: to be able to use the "pull-to-refresh" feature, [InAppWebViewSettings.useHybridComposition] must be `true`.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
class AndroidPullToRefreshController extends PlatformPullToRefreshController
|
class AndroidPullToRefreshController extends PlatformPullToRefreshController
|
||||||
with ChannelController {
|
with ChannelController {
|
||||||
/// Constructs a [AndroidPullToRefreshController].
|
/// Constructs a [AndroidPullToRefreshController].
|
||||||
@ -71,11 +61,6 @@ class AndroidPullToRefreshController extends PlatformPullToRefreshController
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Sets whether the pull-to-refresh feature is enabled or not.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView ([Official API - SwipeRefreshLayout.setEnabled](https://developer.android.com/reference/androidx/swiperefreshlayout/widget/SwipeRefreshLayout#setEnabled(boolean)))
|
|
||||||
///- iOS ([Official API - UIScrollView.refreshControl](https://developer.apple.com/documentation/uikit/uiscrollview/2127691-refreshcontrol))
|
|
||||||
@override
|
@override
|
||||||
Future<void> setEnabled(bool enabled) async {
|
Future<void> setEnabled(bool enabled) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
@ -83,11 +68,6 @@ class AndroidPullToRefreshController extends PlatformPullToRefreshController
|
|||||||
await channel?.invokeMethod('setEnabled', args);
|
await channel?.invokeMethod('setEnabled', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Returns `true` is pull-to-refresh feature is enabled, otherwise `false`.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView ([Official API - View.isEnabled](https://developer.android.com/reference/android/view/View#isEnabled()))
|
|
||||||
///- iOS ([Official API - UIScrollView.refreshControl](https://developer.apple.com/documentation/uikit/uiscrollview/2127691-refreshcontrol))
|
|
||||||
@override
|
@override
|
||||||
Future<bool> isEnabled() async {
|
Future<bool> isEnabled() async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
@ -100,51 +80,22 @@ class AndroidPullToRefreshController extends PlatformPullToRefreshController
|
|||||||
await channel?.invokeMethod('setRefreshing', args);
|
await channel?.invokeMethod('setRefreshing', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Tells the controller that a refresh operation was started programmatically.
|
|
||||||
///
|
|
||||||
///Call this method when an external event source triggers a programmatic refresh of your scrolling view.
|
|
||||||
///This method updates the state of the refresh control to reflect the in-progress refresh operation.
|
|
||||||
///When the refresh operation ends, be sure to call the [endRefreshing] method to return the controller to its default state.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
@override
|
@override
|
||||||
Future<void> beginRefreshing() async {
|
Future<void> beginRefreshing() async {
|
||||||
return await _setRefreshing(true);
|
return await _setRefreshing(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Tells the controller that a refresh operation has ended.
|
|
||||||
///
|
|
||||||
///Call this method at the end of any refresh operation (whether it was initiated programmatically or by the user)
|
|
||||||
///to return the refresh control to its default state.
|
|
||||||
///If the refresh control is at least partially visible, calling this method also hides it.
|
|
||||||
///If animations are also enabled, the control is hidden using an animation.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
@override
|
@override
|
||||||
Future<void> endRefreshing() async {
|
Future<void> endRefreshing() async {
|
||||||
await _setRefreshing(false);
|
await _setRefreshing(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Returns whether a refresh operation has been triggered and is in progress.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView ([Official API - SwipeRefreshLayout.isRefreshing](https://developer.android.com/reference/androidx/swiperefreshlayout/widget/SwipeRefreshLayout#isRefreshing()))
|
|
||||||
///- iOS ([Official API - UIRefreshControl.isRefreshing](https://developer.apple.com/documentation/uikit/uirefreshcontrol/1624844-isrefreshing))
|
|
||||||
@override
|
@override
|
||||||
Future<bool> isRefreshing() async {
|
Future<bool> isRefreshing() async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
return await channel?.invokeMethod<bool>('isRefreshing', args) ?? false;
|
return await channel?.invokeMethod<bool>('isRefreshing', args) ?? false;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Sets the color of the refresh control.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView ([Official API - SwipeRefreshLayout.setColorSchemeColors](https://developer.android.com/reference/androidx/swiperefreshlayout/widget/SwipeRefreshLayout#setColorSchemeColors(int...)))
|
|
||||||
///- iOS ([Official API - UIRefreshControl.tintColor](https://developer.apple.com/documentation/uikit/uirefreshcontrol/1624847-tintcolor))
|
|
||||||
@override
|
@override
|
||||||
Future<void> setColor(Color color) async {
|
Future<void> setColor(Color color) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
@ -152,11 +103,6 @@ class AndroidPullToRefreshController extends PlatformPullToRefreshController
|
|||||||
await channel?.invokeMethod('setColor', args);
|
await channel?.invokeMethod('setColor', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Sets the background color of the refresh control.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView ([Official API - SwipeRefreshLayout.setProgressBackgroundColorSchemeColor](https://developer.android.com/reference/androidx/swiperefreshlayout/widget/SwipeRefreshLayout#setProgressBackgroundColorSchemeColor(int)))
|
|
||||||
///- iOS ([Official API - UIView.backgroundColor](https://developer.apple.com/documentation/uikit/uiview/1622591-backgroundcolor))
|
|
||||||
@override
|
@override
|
||||||
Future<void> setBackgroundColor(Color color) async {
|
Future<void> setBackgroundColor(Color color) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
@ -164,10 +110,6 @@ class AndroidPullToRefreshController extends PlatformPullToRefreshController
|
|||||||
await channel?.invokeMethod('setBackgroundColor', args);
|
await channel?.invokeMethod('setBackgroundColor', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Set the distance to trigger a sync in dips.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView ([Official API - SwipeRefreshLayout.setDistanceToTriggerSync](https://developer.android.com/reference/androidx/swiperefreshlayout/widget/SwipeRefreshLayout#setDistanceToTriggerSync(int)))
|
|
||||||
@override
|
@override
|
||||||
Future<void> setDistanceToTriggerSync(int distanceToTriggerSync) async {
|
Future<void> setDistanceToTriggerSync(int distanceToTriggerSync) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
@ -175,10 +117,6 @@ class AndroidPullToRefreshController extends PlatformPullToRefreshController
|
|||||||
await channel?.invokeMethod('setDistanceToTriggerSync', args);
|
await channel?.invokeMethod('setDistanceToTriggerSync', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Sets the distance that the refresh indicator can be pulled beyond its resting position during a swipe gesture.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView ([Official API - SwipeRefreshLayout.setSlingshotDistance](https://developer.android.com/reference/androidx/swiperefreshlayout/widget/SwipeRefreshLayout#setSlingshotDistance(int)))
|
|
||||||
@override
|
@override
|
||||||
Future<void> setSlingshotDistance(int slingshotDistance) async {
|
Future<void> setSlingshotDistance(int slingshotDistance) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
@ -186,10 +124,6 @@ class AndroidPullToRefreshController extends PlatformPullToRefreshController
|
|||||||
await channel?.invokeMethod('setSlingshotDistance', args);
|
await channel?.invokeMethod('setSlingshotDistance', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Gets the default distance that the refresh indicator can be pulled beyond its resting position during a swipe gesture.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView ([Official API - SwipeRefreshLayout.DEFAULT_SLINGSHOT_DISTANCE](https://developer.android.com/reference/androidx/swiperefreshlayout/widget/SwipeRefreshLayout#DEFAULT_SLINGSHOT_DISTANCE()))
|
|
||||||
@override
|
@override
|
||||||
Future<int> getDefaultSlingshotDistance() async {
|
Future<int> getDefaultSlingshotDistance() async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
@ -198,7 +132,6 @@ class AndroidPullToRefreshController extends PlatformPullToRefreshController
|
|||||||
0;
|
0;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Use [setIndicatorSize] instead.
|
|
||||||
@Deprecated("Use setIndicatorSize instead")
|
@Deprecated("Use setIndicatorSize instead")
|
||||||
@override
|
@override
|
||||||
Future<void> setSize(AndroidPullToRefreshSize size) async {
|
Future<void> setSize(AndroidPullToRefreshSize size) async {
|
||||||
@ -207,10 +140,6 @@ class AndroidPullToRefreshController extends PlatformPullToRefreshController
|
|||||||
await channel?.invokeMethod('setSize', args);
|
await channel?.invokeMethod('setSize', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Sets the size of the refresh indicator. One of [PullToRefreshSize.DEFAULT], or [PullToRefreshSize.LARGE].
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView ([Official API - SwipeRefreshLayout.setSize](https://developer.android.com/reference/androidx/swiperefreshlayout/widget/SwipeRefreshLayout#setSize(int)))
|
|
||||||
@override
|
@override
|
||||||
Future<void> setIndicatorSize(PullToRefreshSize size) async {
|
Future<void> setIndicatorSize(PullToRefreshSize size) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
@ -218,7 +147,6 @@ class AndroidPullToRefreshController extends PlatformPullToRefreshController
|
|||||||
await channel?.invokeMethod('setSize', args);
|
await channel?.invokeMethod('setSize', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Use [setStyledTitle] instead.
|
|
||||||
@Deprecated("Use setStyledTitle instead")
|
@Deprecated("Use setStyledTitle instead")
|
||||||
@override
|
@override
|
||||||
Future<void> setAttributedTitle(IOSNSAttributedString attributedTitle) async {
|
Future<void> setAttributedTitle(IOSNSAttributedString attributedTitle) async {
|
||||||
@ -227,10 +155,6 @@ class AndroidPullToRefreshController extends PlatformPullToRefreshController
|
|||||||
await channel?.invokeMethod('setStyledTitle', args);
|
await channel?.invokeMethod('setStyledTitle', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Sets the styled title text to display in the refresh control.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- iOS ([Official API - UIRefreshControl.attributedTitle](https://developer.apple.com/documentation/uikit/uirefreshcontrol/1624845-attributedtitle))
|
|
||||||
@override
|
@override
|
||||||
Future<void> setStyledTitle(AttributedString attributedTitle) async {
|
Future<void> setStyledTitle(AttributedString attributedTitle) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
@ -238,7 +162,6 @@ class AndroidPullToRefreshController extends PlatformPullToRefreshController
|
|||||||
await channel?.invokeMethod('setStyledTitle', args);
|
await channel?.invokeMethod('setStyledTitle', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Disposes the controller.
|
|
||||||
@override
|
@override
|
||||||
void dispose({bool isKeepAlive = false}) {
|
void dispose({bool isKeepAlive = false}) {
|
||||||
disposeChannel(removeMethodCallHandler: !isKeepAlive);
|
disposeChannel(removeMethodCallHandler: !isKeepAlive);
|
||||||
|
@ -25,12 +25,7 @@ class AndroidServiceWorkerControllerCreationParams
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///Class that manages Service Workers used by [WebView].
|
///{@macro flutter_inappwebview_platform_interface.PlatformServiceWorkerController}
|
||||||
///
|
|
||||||
///**NOTE**: available on Android 24+.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView ([Official API - ServiceWorkerControllerCompat](https://developer.android.com/reference/androidx/webkit/ServiceWorkerControllerCompat))
|
|
||||||
class AndroidServiceWorkerController extends PlatformServiceWorkerController
|
class AndroidServiceWorkerController extends PlatformServiceWorkerController
|
||||||
with ChannelController {
|
with ChannelController {
|
||||||
/// Creates a new [AndroidServiceWorkerController].
|
/// Creates a new [AndroidServiceWorkerController].
|
||||||
@ -68,13 +63,10 @@ class AndroidServiceWorkerController extends PlatformServiceWorkerController
|
|||||||
|
|
||||||
ServiceWorkerClient? _serviceWorkerClient;
|
ServiceWorkerClient? _serviceWorkerClient;
|
||||||
|
|
||||||
|
@override
|
||||||
ServiceWorkerClient? get serviceWorkerClient => _serviceWorkerClient;
|
ServiceWorkerClient? get serviceWorkerClient => _serviceWorkerClient;
|
||||||
|
|
||||||
///Sets the client to capture service worker related callbacks.
|
@override
|
||||||
///A [ServiceWorkerClient] should be set before any service workers are active, e.g. a safe place is before any WebView instances are created or pages loaded.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView ([Official API - ServiceWorkerControllerCompat.setServiceWorkerClient](https://developer.android.com/reference/androidx/webkit/ServiceWorkerControllerCompat#setServiceWorkerClient(androidx.webkit.ServiceWorkerClientCompat)))
|
|
||||||
Future<void> setServiceWorkerClient(ServiceWorkerClient? value) async {
|
Future<void> setServiceWorkerClient(ServiceWorkerClient? value) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
args.putIfAbsent('isNull', () => value == null);
|
args.putIfAbsent('isNull', () => value == null);
|
||||||
@ -106,96 +98,56 @@ class AndroidServiceWorkerController extends PlatformServiceWorkerController
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Gets whether Service Workers support content URL access.
|
@override
|
||||||
///This method should only be called if [WebViewFeature.isFeatureSupported] returns `true` for [WebViewFeature.SERVICE_WORKER_CONTENT_ACCESS].
|
|
||||||
///
|
|
||||||
///**NOTE**: available on Android 24+.
|
|
||||||
///
|
|
||||||
///**Official Android API**: https://developer.android.com/reference/androidx/webkit/ServiceWorkerWebSettingsCompat#getAllowContentAccess()
|
|
||||||
Future<bool> getAllowContentAccess() async {
|
Future<bool> getAllowContentAccess() async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
return await channel?.invokeMethod<bool>('getAllowContentAccess', args) ??
|
return await channel?.invokeMethod<bool>('getAllowContentAccess', args) ??
|
||||||
false;
|
false;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Gets whether Service Workers support file access.
|
@override
|
||||||
///This method should only be called if [WebViewFeature.isFeatureSupported] returns `true` for [WebViewFeature.SERVICE_WORKER_FILE_ACCESS].
|
|
||||||
///
|
|
||||||
///**NOTE**: available on Android 24+.
|
|
||||||
///
|
|
||||||
///**Official Android API**: https://developer.android.com/reference/androidx/webkit/ServiceWorkerWebSettingsCompat#getAllowFileAccess()
|
|
||||||
Future<bool> getAllowFileAccess() async {
|
Future<bool> getAllowFileAccess() async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
return await channel?.invokeMethod<bool>('getAllowFileAccess', args) ??
|
return await channel?.invokeMethod<bool>('getAllowFileAccess', args) ??
|
||||||
false;
|
false;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Gets whether Service Workers are prohibited from loading any resources from the network.
|
@override
|
||||||
///This method should only be called if [WebViewFeature.isFeatureSupported] returns `true` for [WebViewFeature.SERVICE_WORKER_BLOCK_NETWORK_LOADS].
|
|
||||||
///
|
|
||||||
///**NOTE**: available on Android 24+.
|
|
||||||
///
|
|
||||||
///**Official Android API**: https://developer.android.com/reference/androidx/webkit/ServiceWorkerWebSettingsCompat#getBlockNetworkLoads()
|
|
||||||
Future<bool> getBlockNetworkLoads() async {
|
Future<bool> getBlockNetworkLoads() async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
return await channel?.invokeMethod<bool>('getBlockNetworkLoads', args) ??
|
return await channel?.invokeMethod<bool>('getBlockNetworkLoads', args) ??
|
||||||
false;
|
false;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Gets the current setting for overriding the cache mode.
|
@override
|
||||||
///This method should only be called if [WebViewFeature.isFeatureSupported] returns `true` for [WebViewFeature.SERVICE_WORKER_CACHE_MODE].
|
|
||||||
///
|
|
||||||
///**NOTE**: available on Android 24+.
|
|
||||||
///
|
|
||||||
///**Official Android API**: https://developer.android.com/reference/androidx/webkit/ServiceWorkerWebSettingsCompat#getCacheMode()
|
|
||||||
Future<CacheMode?> getCacheMode() async {
|
Future<CacheMode?> getCacheMode() async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
return CacheMode.fromNativeValue(
|
return CacheMode.fromNativeValue(
|
||||||
await channel?.invokeMethod<int?>('getCacheMode', args));
|
await channel?.invokeMethod<int?>('getCacheMode', args));
|
||||||
}
|
}
|
||||||
|
|
||||||
///Enables or disables content URL access from Service Workers.
|
@override
|
||||||
///This method should only be called if [WebViewFeature.isFeatureSupported] returns `true` for [WebViewFeature.SERVICE_WORKER_CONTENT_ACCESS].
|
|
||||||
///
|
|
||||||
///**NOTE**: available on Android 24+.
|
|
||||||
///
|
|
||||||
///**Official Android API**: https://developer.android.com/reference/androidx/webkit/ServiceWorkerWebSettingsCompat#setAllowContentAccess(boolean)
|
|
||||||
Future<void> setAllowContentAccess(bool allow) async {
|
Future<void> setAllowContentAccess(bool allow) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
args.putIfAbsent("allow", () => allow);
|
args.putIfAbsent("allow", () => allow);
|
||||||
await channel?.invokeMethod('setAllowContentAccess', args);
|
await channel?.invokeMethod('setAllowContentAccess', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Enables or disables file access within Service Workers.
|
@override
|
||||||
///This method should only be called if [WebViewFeature.isFeatureSupported] returns `true` for [WebViewFeature.SERVICE_WORKER_FILE_ACCESS].
|
|
||||||
///
|
|
||||||
///**NOTE**: available on Android 24+.
|
|
||||||
///
|
|
||||||
///**Official Android API**: https://developer.android.com/reference/androidx/webkit/ServiceWorkerWebSettingsCompat#setAllowFileAccess(boolean)
|
|
||||||
Future<void> setAllowFileAccess(bool allow) async {
|
Future<void> setAllowFileAccess(bool allow) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
args.putIfAbsent("allow", () => allow);
|
args.putIfAbsent("allow", () => allow);
|
||||||
await channel?.invokeMethod('setAllowFileAccess', args);
|
await channel?.invokeMethod('setAllowFileAccess', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Sets whether Service Workers should not load resources from the network.
|
@override
|
||||||
///This method should only be called if [WebViewFeature.isFeatureSupported] returns `true` for [WebViewFeature.SERVICE_WORKER_BLOCK_NETWORK_LOADS].
|
|
||||||
///
|
|
||||||
///**NOTE**: available on Android 24+.
|
|
||||||
///
|
|
||||||
///**Official Android API**: https://developer.android.com/reference/androidx/webkit/ServiceWorkerWebSettingsCompat#setBlockNetworkLoads(boolean)
|
|
||||||
Future<void> setBlockNetworkLoads(bool flag) async {
|
Future<void> setBlockNetworkLoads(bool flag) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
args.putIfAbsent("flag", () => flag);
|
args.putIfAbsent("flag", () => flag);
|
||||||
await channel?.invokeMethod('setBlockNetworkLoads', args);
|
await channel?.invokeMethod('setBlockNetworkLoads', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Overrides the way the cache is used.
|
@override
|
||||||
///This method should only be called if [WebViewFeature.isFeatureSupported] returns `true` for [WebViewFeature.SERVICE_WORKER_CACHE_MODE].
|
|
||||||
///
|
|
||||||
///**NOTE**: available on Android 24+.
|
|
||||||
///
|
|
||||||
///**Official Android API**: https://developer.android.com/reference/androidx/webkit/ServiceWorkerWebSettingsCompat#setCacheMode(int)
|
|
||||||
Future<void> setCacheMode(CacheMode mode) async {
|
Future<void> setCacheMode(CacheMode mode) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
args.putIfAbsent("mode", () => mode.toNativeValue());
|
args.putIfAbsent("mode", () => mode.toNativeValue());
|
||||||
|
@ -25,15 +25,7 @@ class AndroidTracingControllerCreationParams
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///Manages tracing of [WebView]s.
|
///{@macro flutter_inappwebview_platform_interface.PlatformTracingController}
|
||||||
///In particular provides functionality for the app to enable/disable tracing of parts of code and to collect tracing data.
|
|
||||||
///This is useful for profiling performance issues, debugging and memory usage analysis in production and real life scenarios.
|
|
||||||
///
|
|
||||||
///The resulting trace data is sent back as a byte sequence in json format.
|
|
||||||
///This file can be loaded in "chrome://tracing" for further analysis.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView ([Official API - TracingController](https://developer.android.com/reference/androidx/webkit/TracingController))
|
|
||||||
class AndroidTracingController extends PlatformTracingController
|
class AndroidTracingController extends PlatformTracingController
|
||||||
with ChannelController {
|
with ChannelController {
|
||||||
/// Creates a new [AndroidTracingController].
|
/// Creates a new [AndroidTracingController].
|
||||||
@ -65,39 +57,21 @@ class AndroidTracingController extends PlatformTracingController
|
|||||||
|
|
||||||
Future<dynamic> _handleMethod(MethodCall call) async {}
|
Future<dynamic> _handleMethod(MethodCall call) async {}
|
||||||
|
|
||||||
///Starts tracing all [WebView]s.
|
@override
|
||||||
///Depending on the trace mode in trace config specifies how the trace events are recorded.
|
|
||||||
///For tracing modes [TracingMode.RECORD_UNTIL_FULL] and [TracingMode.RECORD_CONTINUOUSLY]
|
|
||||||
///the events are recorded using an internal buffer and flushed to the outputStream
|
|
||||||
///when [stop] is called.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView ([Official API - TracingController.start](https://developer.android.com/reference/android/webkit/TracingController#start(android.webkit.TracingConfig)))
|
|
||||||
Future<void> start({required TracingSettings settings}) async {
|
Future<void> start({required TracingSettings settings}) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
args.putIfAbsent("settings", () => settings.toMap());
|
args.putIfAbsent("settings", () => settings.toMap());
|
||||||
await channel?.invokeMethod('start', args);
|
await channel?.invokeMethod('start', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Stops tracing and flushes tracing data to the specified output stream.
|
@override
|
||||||
///The data is sent to the specified output stream in json format typically in
|
|
||||||
///chunks.
|
|
||||||
///
|
|
||||||
///Returns `false` if the WebView framework was not tracing at the time of the call,
|
|
||||||
///`true` otherwise.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView ([Official API - TracingController.stop](https://developer.android.com/reference/android/webkit/TracingController#stop(java.io.OutputStream,%20java.util.concurrent.Executor)))
|
|
||||||
Future<bool> stop({String? filePath}) async {
|
Future<bool> stop({String? filePath}) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
args.putIfAbsent("filePath", () => filePath);
|
args.putIfAbsent("filePath", () => filePath);
|
||||||
return await channel?.invokeMethod<bool>('stop', args) ?? false;
|
return await channel?.invokeMethod<bool>('stop', args) ?? false;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Returns whether the WebView framework is tracing.
|
@override
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView ([Official API - TracingController.isTracing](https://developer.android.com/reference/android/webkit/TracingController#isTracing()))
|
|
||||||
Future<bool> isTracing() async {
|
Future<bool> isTracing() async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
return await channel?.invokeMethod<bool>('isTracing', args) ?? false;
|
return await channel?.invokeMethod<bool>('isTracing', args) ?? false;
|
||||||
|
@ -30,12 +30,7 @@ class AndroidWebMessageChannelCreationParams
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///The representation of the [HTML5 message channels](https://html.spec.whatwg.org/multipage/web-messaging.html#message-channels).
|
///{@macro flutter_inappwebview_platform_interface.PlatformWebMessageChannel}
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- MacOS
|
|
||||||
class AndroidWebMessageChannel extends PlatformWebMessageChannel
|
class AndroidWebMessageChannel extends PlatformWebMessageChannel
|
||||||
with ChannelController {
|
with ChannelController {
|
||||||
/// Constructs a [AndroidWebMessageChannel].
|
/// Constructs a [AndroidWebMessageChannel].
|
||||||
@ -60,6 +55,7 @@ class AndroidWebMessageChannel extends PlatformWebMessageChannel
|
|||||||
port2: AndroidWebMessagePort(
|
port2: AndroidWebMessagePort(
|
||||||
AndroidWebMessagePortCreationParams(index: 1))));
|
AndroidWebMessagePortCreationParams(index: 1))));
|
||||||
|
|
||||||
|
/// Provide static access.
|
||||||
factory AndroidWebMessageChannel.static() {
|
factory AndroidWebMessageChannel.static() {
|
||||||
return _staticValue;
|
return _staticValue;
|
||||||
}
|
}
|
||||||
@ -108,7 +104,6 @@ class AndroidWebMessageChannel extends PlatformWebMessageChannel
|
|||||||
return _fromMap(map);
|
return _fromMap(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Disposes the web message channel.
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
disposeChannel();
|
disposeChannel();
|
||||||
|
@ -36,12 +36,7 @@ class AndroidWebMessageListenerCreationParams
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///This listener receives messages sent on the JavaScript object which was injected by [InAppWebViewController.addWebMessageListener].
|
///{@macro flutter_inappwebview_platform_interface.PlatformWebMessageListener}
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- MacOS
|
|
||||||
class AndroidWebMessageListener extends PlatformWebMessageListener
|
class AndroidWebMessageListener extends PlatformWebMessageListener
|
||||||
with ChannelController {
|
with ChannelController {
|
||||||
/// Constructs a [AndroidWebMessageListener].
|
/// Constructs a [AndroidWebMessageListener].
|
||||||
@ -99,6 +94,7 @@ class AndroidWebMessageListener extends PlatformWebMessageListener
|
|||||||
disposeChannel();
|
disposeChannel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
Map<String, dynamic> toMap() {
|
Map<String, dynamic> toMap() {
|
||||||
return {
|
return {
|
||||||
"id": _id,
|
"id": _id,
|
||||||
@ -107,6 +103,7 @@ class AndroidWebMessageListener extends PlatformWebMessageListener
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
return this.toMap();
|
return this.toMap();
|
||||||
}
|
}
|
||||||
@ -139,11 +136,7 @@ class AndroidJavaScriptReplyProxyCreationParams
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///This class represents the JavaScript object injected by [InAppWebViewController.addWebMessageListener].
|
///{@macro flutter_inappwebview_platform_interface.JavaScriptReplyProxy}
|
||||||
///An instance will be given by [AndroidWebMessageListener.onPostMessage].
|
|
||||||
///The app can use `postMessage(String)` to talk to the JavaScript context.
|
|
||||||
///
|
|
||||||
///There is a 1:1 relationship between this object and the JavaScript object in a frame.
|
|
||||||
class AndroidJavaScriptReplyProxy extends PlatformJavaScriptReplyProxy {
|
class AndroidJavaScriptReplyProxy extends PlatformJavaScriptReplyProxy {
|
||||||
/// Constructs a [AndroidWebMessageListener].
|
/// Constructs a [AndroidWebMessageListener].
|
||||||
AndroidJavaScriptReplyProxy(PlatformJavaScriptReplyProxyCreationParams params)
|
AndroidJavaScriptReplyProxy(PlatformJavaScriptReplyProxyCreationParams params)
|
||||||
@ -157,11 +150,7 @@ class AndroidJavaScriptReplyProxy extends PlatformJavaScriptReplyProxy {
|
|||||||
AndroidWebMessageListener get _androidWebMessageListener =>
|
AndroidWebMessageListener get _androidWebMessageListener =>
|
||||||
params.webMessageListener as AndroidWebMessageListener;
|
params.webMessageListener as AndroidWebMessageListener;
|
||||||
|
|
||||||
///Post a [message] to the injected JavaScript object which sent this [AndroidJavaScriptReplyProxy].
|
@override
|
||||||
///
|
|
||||||
///If [message] is of type [WebMessageType.ARRAY_BUFFER], be aware that large byte buffers can lead to out-of-memory crashes on low-end devices.
|
|
||||||
///
|
|
||||||
///**Official Android API**: https://developer.android.com/reference/androidx/webkit/JavaScriptReplyProxy#postMessage(java.lang.String)
|
|
||||||
Future<void> postMessage(WebMessage message) async {
|
Future<void> postMessage(WebMessage message) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
args.putIfAbsent('message', () => message.toMap());
|
args.putIfAbsent('message', () => message.toMap());
|
||||||
|
@ -28,24 +28,7 @@ class AndroidWebMessagePortCreationParams
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///The representation of the [HTML5 message ports](https://html.spec.whatwg.org/multipage/comms.html#messageport).
|
///{@macro flutter_inappwebview_platform_interface.PlatformWebMessagePort}
|
||||||
///
|
|
||||||
///A Message port represents one endpoint of a Message Channel. In Android webview, there is no separate Message Channel object.
|
|
||||||
///When a message channel is created, both ports are tangled to each other and started.
|
|
||||||
///See [InAppWebViewController.createWebMessageChannel] for creating a message channel.
|
|
||||||
///
|
|
||||||
///When a message port is first created or received via transfer, it does not have a [WebMessageCallback] to receive web messages.
|
|
||||||
///On Android, the messages are queued until a [WebMessageCallback] is set.
|
|
||||||
///
|
|
||||||
///A message port should be closed when it is not used by the embedder application anymore.
|
|
||||||
///A closed port cannot be transferred or cannot be reopened to send messages.
|
|
||||||
///Close can be called multiple times.
|
|
||||||
///
|
|
||||||
///When a port is transferred to JavaScript, it cannot be used to send or receive messages at the Dart side anymore.
|
|
||||||
///Different from HTML5 Spec, a port cannot be transferred if one of these has ever happened: i. a message callback was set, ii. a message was posted on it.
|
|
||||||
///A transferred port cannot be closed by the application, since the ownership is also transferred.
|
|
||||||
///
|
|
||||||
///It is possible to transfer both ports of a channel to JavaScript, for example for communication between subframes.
|
|
||||||
class AndroidWebMessagePort extends PlatformWebMessagePort {
|
class AndroidWebMessagePort extends PlatformWebMessagePort {
|
||||||
WebMessageCallback? _onMessage;
|
WebMessageCallback? _onMessage;
|
||||||
late AndroidWebMessageChannel _webMessageChannel;
|
late AndroidWebMessageChannel _webMessageChannel;
|
||||||
@ -59,7 +42,7 @@ class AndroidWebMessagePort extends PlatformWebMessagePort {
|
|||||||
.fromPlatformWebMessagePortCreationParams(params),
|
.fromPlatformWebMessagePortCreationParams(params),
|
||||||
);
|
);
|
||||||
|
|
||||||
///Sets a callback to receive message events on the main thread.
|
@override
|
||||||
Future<void> setWebMessageCallback(WebMessageCallback? onMessage) async {
|
Future<void> setWebMessageCallback(WebMessageCallback? onMessage) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
args.putIfAbsent('index', () => params.index);
|
args.putIfAbsent('index', () => params.index);
|
||||||
@ -68,7 +51,7 @@ class AndroidWebMessagePort extends PlatformWebMessagePort {
|
|||||||
this._onMessage = onMessage;
|
this._onMessage = onMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Post a WebMessage to the entangled port.
|
@override
|
||||||
Future<void> postMessage(WebMessage message) async {
|
Future<void> postMessage(WebMessage message) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
args.putIfAbsent('index', () => params.index);
|
args.putIfAbsent('index', () => params.index);
|
||||||
@ -76,13 +59,14 @@ class AndroidWebMessagePort extends PlatformWebMessagePort {
|
|||||||
await _webMessageChannel.internalChannel?.invokeMethod('postMessage', args);
|
await _webMessageChannel.internalChannel?.invokeMethod('postMessage', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Close the message port and free any resources associated with it.
|
@override
|
||||||
Future<void> close() async {
|
Future<void> close() async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
args.putIfAbsent('index', () => params.index);
|
args.putIfAbsent('index', () => params.index);
|
||||||
await _webMessageChannel.internalChannel?.invokeMethod('close', args);
|
await _webMessageChannel.internalChannel?.invokeMethod('close', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
Map<String, dynamic> toMap() {
|
Map<String, dynamic> toMap() {
|
||||||
return {
|
return {
|
||||||
"index": params.index,
|
"index": params.index,
|
||||||
@ -90,6 +74,7 @@ class AndroidWebMessagePort extends PlatformWebMessagePort {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
return toMap();
|
return toMap();
|
||||||
}
|
}
|
||||||
|
@ -25,14 +25,7 @@ class AndroidWebStorageCreationParams extends PlatformWebStorageCreationParams {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///Class that provides access to the JavaScript [Web Storage API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API): `window.sessionStorage` and `window.localStorage`.
|
///{@macro flutter_inappwebview_platform_interface.PlatformWebStorage}
|
||||||
///It used by [InAppWebViewController.webStorage].
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- MacOS
|
|
||||||
///- Web
|
|
||||||
class AndroidWebStorage extends PlatformWebStorage {
|
class AndroidWebStorage extends PlatformWebStorage {
|
||||||
/// Constructs a [AndroidWebStorage].
|
/// Constructs a [AndroidWebStorage].
|
||||||
AndroidWebStorage(PlatformWebStorageCreationParams params)
|
AndroidWebStorage(PlatformWebStorageCreationParams params)
|
||||||
@ -43,11 +36,12 @@ class AndroidWebStorage extends PlatformWebStorage {
|
|||||||
.fromPlatformWebStorageCreationParams(params),
|
.fromPlatformWebStorageCreationParams(params),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
PlatformLocalStorage get localStorage => params.localStorage;
|
PlatformLocalStorage get localStorage => params.localStorage;
|
||||||
|
|
||||||
|
@override
|
||||||
PlatformSessionStorage get sessionStorage => params.sessionStorage;
|
PlatformSessionStorage get sessionStorage => params.sessionStorage;
|
||||||
|
|
||||||
///Disposes the web storage.
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
localStorage.dispose();
|
localStorage.dispose();
|
||||||
@ -73,8 +67,7 @@ class AndroidStorageCreationParams extends PlatformStorageCreationParams {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///Class that provides methods to manage the JavaScript [Storage](https://developer.mozilla.org/en-US/docs/Web/API/Storage) object.
|
///{@macro flutter_inappwebview_platform_interface.PlatformStorage}
|
||||||
///It is used by [AndroidLocalStorage] and [AndroidSessionStorage].
|
|
||||||
class AndroidStorage extends PlatformStorage {
|
class AndroidStorage extends PlatformStorage {
|
||||||
/// Constructs a [AndroidStorage].
|
/// Constructs a [AndroidStorage].
|
||||||
AndroidStorage(PlatformStorageCreationParams params)
|
AndroidStorage(PlatformStorageCreationParams params)
|
||||||
@ -87,14 +80,7 @@ class AndroidStorage extends PlatformStorage {
|
|||||||
|
|
||||||
AndroidInAppWebViewController? _controller;
|
AndroidInAppWebViewController? _controller;
|
||||||
|
|
||||||
///Returns an integer representing the number of data items stored in the Storage object.
|
@override
|
||||||
///
|
|
||||||
///**NOTE for Web**: this method will have effect only if the iframe has the same origin.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- Web
|
|
||||||
Future<int?> length() async {
|
Future<int?> length() async {
|
||||||
var result = await _controller?.evaluateJavascript(source: """
|
var result = await _controller?.evaluateJavascript(source: """
|
||||||
window.$webStorageType.length;
|
window.$webStorageType.length;
|
||||||
@ -102,14 +88,7 @@ class AndroidStorage extends PlatformStorage {
|
|||||||
return result != null ? int.parse(json.decode(result)) : null;
|
return result != null ? int.parse(json.decode(result)) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
///When passed a [key] name and [value], will add that key to the storage, or update that key's value if it already exists.
|
@override
|
||||||
///
|
|
||||||
///**NOTE for Web**: this method will have effect only if the iframe has the same origin.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- Web
|
|
||||||
Future<void> setItem({required String key, required dynamic value}) async {
|
Future<void> setItem({required String key, required dynamic value}) async {
|
||||||
var encodedValue = json.encode(value);
|
var encodedValue = json.encode(value);
|
||||||
await _controller?.evaluateJavascript(source: """
|
await _controller?.evaluateJavascript(source: """
|
||||||
@ -117,14 +96,7 @@ class AndroidStorage extends PlatformStorage {
|
|||||||
""");
|
""");
|
||||||
}
|
}
|
||||||
|
|
||||||
///When passed a [key] name, will return that key's value, or `null` if the key does not exist, in the given Storage object.
|
@override
|
||||||
///
|
|
||||||
///**NOTE for Web**: this method will have effect only if the iframe has the same origin.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- Web
|
|
||||||
Future<dynamic> getItem({required String key}) async {
|
Future<dynamic> getItem({required String key}) async {
|
||||||
var itemValue = await _controller?.evaluateJavascript(source: """
|
var itemValue = await _controller?.evaluateJavascript(source: """
|
||||||
window.$webStorageType.getItem("$key");
|
window.$webStorageType.getItem("$key");
|
||||||
@ -141,28 +113,14 @@ class AndroidStorage extends PlatformStorage {
|
|||||||
return itemValue;
|
return itemValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
///When passed a [key] name, will remove that key from the given Storage object if it exists.
|
@override
|
||||||
///
|
|
||||||
///**NOTE for Web**: this method will have effect only if the iframe has the same origin.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- Web
|
|
||||||
Future<void> removeItem({required String key}) async {
|
Future<void> removeItem({required String key}) async {
|
||||||
await _controller?.evaluateJavascript(source: """
|
await _controller?.evaluateJavascript(source: """
|
||||||
window.$webStorageType.removeItem("$key");
|
window.$webStorageType.removeItem("$key");
|
||||||
""");
|
""");
|
||||||
}
|
}
|
||||||
|
|
||||||
///Returns the list of all items from the given Storage object.
|
@override
|
||||||
///
|
|
||||||
///**NOTE for Web**: this method will have effect only if the iframe has the same origin.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- Web
|
|
||||||
Future<List<WebStorageItem>> getItems() async {
|
Future<List<WebStorageItem>> getItems() async {
|
||||||
var webStorageItems = <WebStorageItem>[];
|
var webStorageItems = <WebStorageItem>[];
|
||||||
|
|
||||||
@ -195,29 +153,14 @@ class AndroidStorage extends PlatformStorage {
|
|||||||
return webStorageItems;
|
return webStorageItems;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Clears all keys stored in a given Storage object.
|
@override
|
||||||
///
|
|
||||||
///**NOTE for Web**: this method will have effect only if the iframe has the same origin.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- Web
|
|
||||||
Future<void> clear() async {
|
Future<void> clear() async {
|
||||||
await _controller?.evaluateJavascript(source: """
|
await _controller?.evaluateJavascript(source: """
|
||||||
window.$webStorageType.clear();
|
window.$webStorageType.clear();
|
||||||
""");
|
""");
|
||||||
}
|
}
|
||||||
|
|
||||||
///When passed a number [index], returns the name of the nth key in a given Storage object.
|
@override
|
||||||
///The order of keys is user-agent defined, so you should not rely on it.
|
|
||||||
///
|
|
||||||
///**NOTE for Web**: this method will have effect only if the iframe has the same origin.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- Web
|
|
||||||
Future<String> key({required int index}) async {
|
Future<String> key({required int index}) async {
|
||||||
var result = await _controller?.evaluateJavascript(source: """
|
var result = await _controller?.evaluateJavascript(source: """
|
||||||
window.$webStorageType.key($index);
|
window.$webStorageType.key($index);
|
||||||
@ -225,7 +168,6 @@ class AndroidStorage extends PlatformStorage {
|
|||||||
return result != null ? json.decode(result) : null;
|
return result != null ? json.decode(result) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Disposes the storage.
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
_controller = null;
|
_controller = null;
|
||||||
@ -251,8 +193,7 @@ class AndroidLocalStorageCreationParams
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///Class that provides methods to manage the JavaScript `window.localStorage` object.
|
///{@macro flutter_inappwebview_platform_interface.PlatformLocalStorage}
|
||||||
///It used by [AndroidWebStorage].
|
|
||||||
class AndroidLocalStorage extends AndroidStorage
|
class AndroidLocalStorage extends AndroidStorage
|
||||||
implements PlatformLocalStorage {
|
implements PlatformLocalStorage {
|
||||||
/// Constructs a [AndroidLocalStorage].
|
/// Constructs a [AndroidLocalStorage].
|
||||||
@ -291,8 +232,7 @@ class AndroidSessionStorageCreationParams
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///Class that provides methods to manage the JavaScript `window.sessionStorage` object.
|
///{@macro flutter_inappwebview_platform_interface.PlatformSessionStorage}
|
||||||
///It used by [AndroidWebStorage].
|
|
||||||
class AndroidSessionStorage extends AndroidStorage
|
class AndroidSessionStorage extends AndroidStorage
|
||||||
implements PlatformSessionStorage {
|
implements PlatformSessionStorage {
|
||||||
/// Constructs a [AndroidSessionStorage].
|
/// Constructs a [AndroidSessionStorage].
|
||||||
|
@ -26,16 +26,7 @@ class AndroidWebStorageManagerCreationParams
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///Class that implements a singleton object (shared instance) which manages the web storage used by WebView instances.
|
///{@macro flutter_inappwebview_platform_interface.PlatformWebStorageManager}
|
||||||
///On Android, it is implemented using [WebStorage](https://developer.android.com/reference/android/webkit/WebStorage.html).
|
|
||||||
///On iOS and MacOS, it is implemented using [WKWebsiteDataStore.default()](https://developer.apple.com/documentation/webkit/wkwebsitedatastore).
|
|
||||||
///
|
|
||||||
///**NOTE for iOS**: available from iOS 9.0+.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- MacOS
|
|
||||||
class AndroidWebStorageManager extends PlatformWebStorageManager
|
class AndroidWebStorageManager extends PlatformWebStorageManager
|
||||||
with ChannelController {
|
with ChannelController {
|
||||||
/// Creates a new [AndroidWebStorageManager].
|
/// Creates a new [AndroidWebStorageManager].
|
||||||
@ -67,10 +58,7 @@ class AndroidWebStorageManager extends PlatformWebStorageManager
|
|||||||
|
|
||||||
Future<dynamic> _handleMethod(MethodCall call) async {}
|
Future<dynamic> _handleMethod(MethodCall call) async {}
|
||||||
|
|
||||||
///Gets the origins currently using either the Application Cache or Web SQL Database APIs.
|
@override
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView ([Official API - WebStorage.getOrigins](https://developer.android.com/reference/android/webkit/WebStorage#getOrigins(android.webkit.ValueCallback%3Cjava.util.Map%3E)))
|
|
||||||
Future<List<WebStorageOrigin>> getOrigins() async {
|
Future<List<WebStorageOrigin>> getOrigins() async {
|
||||||
List<WebStorageOrigin> originsList = [];
|
List<WebStorageOrigin> originsList = [];
|
||||||
|
|
||||||
@ -90,57 +78,34 @@ class AndroidWebStorageManager extends PlatformWebStorageManager
|
|||||||
return originsList;
|
return originsList;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Clears all storage currently being used by the JavaScript storage APIs.
|
@override
|
||||||
///This includes the Application Cache, Web SQL Database and the HTML5 Web Storage APIs.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView ([Official API - WebStorage.deleteAllData](https://developer.android.com/reference/android/webkit/WebStorage#deleteAllData()))
|
|
||||||
Future<void> deleteAllData() async {
|
Future<void> deleteAllData() async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
await channel?.invokeMethod('deleteAllData', args);
|
await channel?.invokeMethod('deleteAllData', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Clears the storage currently being used by both the Application Cache and Web SQL Database APIs by the given [origin].
|
@override
|
||||||
///The origin is specified using its string representation.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView ([Official API - WebStorage.deleteOrigin](https://developer.android.com/reference/android/webkit/WebStorage#deleteOrigin(java.lang.String)))
|
|
||||||
Future<void> deleteOrigin({required String origin}) async {
|
Future<void> deleteOrigin({required String origin}) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
args.putIfAbsent("origin", () => origin);
|
args.putIfAbsent("origin", () => origin);
|
||||||
await channel?.invokeMethod('deleteOrigin', args);
|
await channel?.invokeMethod('deleteOrigin', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Gets the storage quota for the Web SQL Database API for the given [origin].
|
@override
|
||||||
///The quota is given in bytes and the origin is specified using its string representation.
|
|
||||||
///Note that a quota is not enforced on a per-origin basis for the Application Cache API.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView ([Official API - WebStorage.getQuotaForOrigin](https://developer.android.com/reference/android/webkit/WebStorage#getQuotaForOrigin(java.lang.String,%20android.webkit.ValueCallback%3Cjava.lang.Long%3E)))
|
|
||||||
Future<int> getQuotaForOrigin({required String origin}) async {
|
Future<int> getQuotaForOrigin({required String origin}) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
args.putIfAbsent("origin", () => origin);
|
args.putIfAbsent("origin", () => origin);
|
||||||
return await channel?.invokeMethod<int>('getQuotaForOrigin', args) ?? 0;
|
return await channel?.invokeMethod<int>('getQuotaForOrigin', args) ?? 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Gets the amount of storage currently being used by both the Application Cache and Web SQL Database APIs by the given [origin].
|
@override
|
||||||
///The amount is given in bytes and the origin is specified using its string representation.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView ([Official API - WebStorage.getUsageForOrigin](https://developer.android.com/reference/android/webkit/WebStorage#getUsageForOrigin(java.lang.String,%20android.webkit.ValueCallback%3Cjava.lang.Long%3E)))
|
|
||||||
Future<int> getUsageForOrigin({required String origin}) async {
|
Future<int> getUsageForOrigin({required String origin}) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
args.putIfAbsent("origin", () => origin);
|
args.putIfAbsent("origin", () => origin);
|
||||||
return await channel?.invokeMethod<int>('getUsageForOrigin', args) ?? 0;
|
return await channel?.invokeMethod<int>('getUsageForOrigin', args) ?? 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Fetches data records containing the given website data types.
|
@override
|
||||||
///
|
|
||||||
///[dataTypes] represents the website data types to fetch records for.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- iOS ([Official API - WKWebsiteDataStore.fetchDataRecords](https://developer.apple.com/documentation/webkit/wkwebsitedatastore/1532932-fetchdatarecords))
|
|
||||||
///- MacOS ([Official API - WKWebsiteDataStore.fetchDataRecords](https://developer.apple.com/documentation/webkit/wkwebsitedatastore/1532932-fetchdatarecords))
|
|
||||||
Future<List<WebsiteDataRecord>> fetchDataRecords(
|
Future<List<WebsiteDataRecord>> fetchDataRecords(
|
||||||
{required Set<WebsiteDataType> dataTypes}) async {
|
{required Set<WebsiteDataType> dataTypes}) async {
|
||||||
List<WebsiteDataRecord> recordList = [];
|
List<WebsiteDataRecord> recordList = [];
|
||||||
@ -169,15 +134,7 @@ class AndroidWebStorageManager extends PlatformWebStorageManager
|
|||||||
return recordList;
|
return recordList;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Removes website data of the given types for the given data records.
|
@override
|
||||||
///
|
|
||||||
///[dataTypes] represents the website data types that should be removed.
|
|
||||||
///
|
|
||||||
///[dataRecords] represents the website data records to delete website data for.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- iOS ([Official API - WKWebsiteDataStore.removeData](https://developer.apple.com/documentation/webkit/wkwebsitedatastore/1532936-removedata))
|
|
||||||
///- MacOS ([Official API - WKWebsiteDataStore.removeData](https://developer.apple.com/documentation/webkit/wkwebsitedatastore/1532936-removedata))
|
|
||||||
Future<void> removeDataFor(
|
Future<void> removeDataFor(
|
||||||
{required Set<WebsiteDataType> dataTypes,
|
{required Set<WebsiteDataType> dataTypes,
|
||||||
required List<WebsiteDataRecord> dataRecords}) async {
|
required List<WebsiteDataRecord> dataRecords}) async {
|
||||||
@ -197,15 +154,7 @@ class AndroidWebStorageManager extends PlatformWebStorageManager
|
|||||||
await channel?.invokeMethod('removeDataFor', args);
|
await channel?.invokeMethod('removeDataFor', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Removes all website data of the given types that has been modified since the given date.
|
@override
|
||||||
///
|
|
||||||
///[dataTypes] represents the website data types that should be removed.
|
|
||||||
///
|
|
||||||
///[date] represents a date. All website data modified after this date will be removed.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- iOS ([Official API - WKWebsiteDataStore.removeData](https://developer.apple.com/documentation/webkit/wkwebsitedatastore/1532938-removedata))
|
|
||||||
///- MacOS ([Official API - WKWebsiteDataStore.removeData](https://developer.apple.com/documentation/webkit/wkwebsitedatastore/1532938-removedata))
|
|
||||||
Future<void> removeDataModifiedSince(
|
Future<void> removeDataModifiedSince(
|
||||||
{required Set<WebsiteDataType> dataTypes, required DateTime date}) async {
|
{required Set<WebsiteDataType> dataTypes, required DateTime date}) async {
|
||||||
List<String> dataTypesList = [];
|
List<String> dataTypesList = [];
|
||||||
|
@ -24,9 +24,7 @@ class AndroidPathHandlerCreationParams
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///A handler that produces responses for a registered path.
|
///{@macro flutter_inappwebview_platform_interface.PlatformPathHandler}
|
||||||
///
|
|
||||||
///Implement this interface to handle other use-cases according to your app's needs.
|
|
||||||
class AndroidPathHandler extends PlatformPathHandler with ChannelController {
|
class AndroidPathHandler extends PlatformPathHandler with ChannelController {
|
||||||
/// Creates a new [AndroidPathHandler].
|
/// Creates a new [AndroidPathHandler].
|
||||||
AndroidPathHandler(PlatformPathHandlerCreationParams params)
|
AndroidPathHandler(PlatformPathHandlerCreationParams params)
|
||||||
@ -57,12 +55,12 @@ class AndroidPathHandler extends PlatformPathHandler with ChannelController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///Converts instance to a map.
|
@override
|
||||||
Map<String, dynamic> toMap() {
|
Map<String, dynamic> toMap() {
|
||||||
return {"path": path, "type": _type, "id": _id};
|
return {"path": path, "type": _type, "id": _id};
|
||||||
}
|
}
|
||||||
|
|
||||||
///Converts instance to a map.
|
@override
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
return toMap();
|
return toMap();
|
||||||
}
|
}
|
||||||
@ -101,19 +99,7 @@ class AndroidAssetsPathHandlerCreationParams
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///Handler class to open a file from assets directory in the application APK.
|
///{@macro flutter_inappwebview_platform_interface.PlatformAssetsPathHandler}
|
||||||
///
|
|
||||||
///Opens the requested file from the application's assets directory.
|
|
||||||
///
|
|
||||||
///The matched prefix path used shouldn't be a prefix of a real web path.
|
|
||||||
///Thus, if the requested file cannot be found a [WebResourceResponse] object with a `null` data will be returned instead of `null`.
|
|
||||||
///This saves the time of falling back to network and trying to resolve a path that doesn't exist.
|
|
||||||
///A [WebResourceResponse] with `null` data will be received as an HTTP response with status code `404` and no body.
|
|
||||||
///
|
|
||||||
///The MIME type for the file will be determined from the file's extension using
|
|
||||||
///[guessContentTypeFromName](https://developer.android.com/reference/java/net/URLConnection.html#guessContentTypeFromName-java.lang.String-).
|
|
||||||
///Developers should ensure that asset files are named using standard file extensions.
|
|
||||||
///If the file does not have a recognised extension, `text/plain` will be used by default.
|
|
||||||
class AndroidAssetsPathHandler extends AndroidPathHandler
|
class AndroidAssetsPathHandler extends AndroidPathHandler
|
||||||
implements PlatformAssetsPathHandler {
|
implements PlatformAssetsPathHandler {
|
||||||
/// Constructs a [AndroidAssetsPathHandler].
|
/// Constructs a [AndroidAssetsPathHandler].
|
||||||
@ -148,19 +134,7 @@ class AndroidResourcesPathHandlerCreationParams
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///Handler class to open a file from resources directory in the application APK.
|
///{@macro flutter_inappwebview_platform_interface.PlatformResourcesPathHandler}
|
||||||
///
|
|
||||||
///Opens the requested file from application's resources directory.
|
|
||||||
///
|
|
||||||
///The matched prefix path used shouldn't be a prefix of a real web path.
|
|
||||||
///Thus, if the requested file cannot be found a [WebResourceResponse] object with a `null` data will be returned instead of `null`.
|
|
||||||
///This saves the time of falling back to network and trying to resolve a path that doesn't exist.
|
|
||||||
///A [WebResourceResponse] with `null` data will be received as an HTTP response with status code `404` and no body.
|
|
||||||
///
|
|
||||||
///The MIME type for the file will be determined from the file's extension using
|
|
||||||
///[guessContentTypeFromName](https://developer.android.com/reference/java/net/URLConnection.html#guessContentTypeFromName-java.lang.String-).
|
|
||||||
///Developers should ensure that asset files are named using standard file extensions.
|
|
||||||
///If the file does not have a recognised extension, `text/plain` will be used by default.
|
|
||||||
class AndroidResourcesPathHandler extends AndroidPathHandler
|
class AndroidResourcesPathHandler extends AndroidPathHandler
|
||||||
implements PlatformResourcesPathHandler {
|
implements PlatformResourcesPathHandler {
|
||||||
/// Constructs a [AndroidResourcesPathHandler].
|
/// Constructs a [AndroidResourcesPathHandler].
|
||||||
@ -195,24 +169,7 @@ class AndroidInternalStoragePathHandlerCreationParams
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///Handler class to open files from application internal storage.
|
///{@macro flutter_inappwebview_platform_interface.PlatformInternalStoragePathHandler}
|
||||||
///For more information about android storage please refer to
|
|
||||||
///[Android Developers Docs: Data and file storage overview](https://developer.android.com/guide/topics/data/data-storage).
|
|
||||||
///
|
|
||||||
///To avoid leaking user or app data to the web, make sure to choose [directory] carefully,
|
|
||||||
///and assume any file under this directory could be accessed by any web page subject to same-origin rules.
|
|
||||||
///
|
|
||||||
///Opens the requested file from the exposed data directory.
|
|
||||||
///
|
|
||||||
///The matched prefix path used shouldn't be a prefix of a real web path.
|
|
||||||
///Thus, if the requested file cannot be found a [WebResourceResponse] object with a `null` data will be returned instead of `null`.
|
|
||||||
///This saves the time of falling back to network and trying to resolve a path that doesn't exist.
|
|
||||||
///A [WebResourceResponse] with `null` data will be received as an HTTP response with status code `404` and no body.
|
|
||||||
///
|
|
||||||
///The MIME type for the file will be determined from the file's extension using
|
|
||||||
///[guessContentTypeFromName](https://developer.android.com/reference/java/net/URLConnection.html#guessContentTypeFromName-java.lang.String-).
|
|
||||||
///Developers should ensure that asset files are named using standard file extensions.
|
|
||||||
///If the file does not have a recognised extension, `text/plain` will be used by default.
|
|
||||||
class AndroidInternalStoragePathHandler extends AndroidPathHandler
|
class AndroidInternalStoragePathHandler extends AndroidPathHandler
|
||||||
implements PlatformInternalStoragePathHandler {
|
implements PlatformInternalStoragePathHandler {
|
||||||
/// Constructs a [AndroidInternalStoragePathHandler].
|
/// Constructs a [AndroidInternalStoragePathHandler].
|
||||||
|
@ -25,10 +25,7 @@ class AndroidWebViewFeatureCreationParams
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///Class that represents an Android-specific utility class for checking which WebView Support Library features are supported on the device.
|
///{@macro flutter_inappwebview_platform_interface.PlatformWebViewFeature}
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
class AndroidWebViewFeature extends PlatformWebViewFeature
|
class AndroidWebViewFeature extends PlatformWebViewFeature
|
||||||
with ChannelController {
|
with ChannelController {
|
||||||
/// Creates a new [AndroidWebViewFeature].
|
/// Creates a new [AndroidWebViewFeature].
|
||||||
@ -64,19 +61,7 @@ class AndroidWebViewFeature extends PlatformWebViewFeature
|
|||||||
|
|
||||||
Future<dynamic> _handleMethod(MethodCall call) async {}
|
Future<dynamic> _handleMethod(MethodCall call) async {}
|
||||||
|
|
||||||
///Return whether a feature is supported at run-time. On devices running Android version `Build.VERSION_CODES.LOLLIPOP` and higher,
|
@override
|
||||||
///this will check whether a feature is supported, depending on the combination of the desired feature, the Android version of device,
|
|
||||||
///and the WebView APK on the device. If running on a device with a lower API level, this will always return `false`.
|
|
||||||
///
|
|
||||||
///**Note**: This method is different from [isStartupFeatureSupported] and this
|
|
||||||
///method only accepts certain features.
|
|
||||||
///Please verify that the correct feature checking method is used for a particular feature.
|
|
||||||
///
|
|
||||||
///**Note**: If this method returns `false`, it is not safe to invoke the methods
|
|
||||||
///requiring the desired feature.
|
|
||||||
///Furthermore, if this method returns `false` for a particular feature, any callback guarded by that feature will not be invoked.
|
|
||||||
///
|
|
||||||
///**Official Android API**: https://developer.android.com/reference/androidx/webkit/WebViewFeature#isFeatureSupported(java.lang.String)
|
|
||||||
Future<bool> isFeatureSupported(WebViewFeature feature) async {
|
Future<bool> isFeatureSupported(WebViewFeature feature) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
args.putIfAbsent("feature", () => feature.toNativeValue());
|
args.putIfAbsent("feature", () => feature.toNativeValue());
|
||||||
@ -84,21 +69,7 @@ class AndroidWebViewFeature extends PlatformWebViewFeature
|
|||||||
false;
|
false;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Return whether a startup feature is supported at run-time.
|
@override
|
||||||
///On devices running Android version `Build.VERSION_CODES.LOLLIPOP` and higher,
|
|
||||||
///this will check whether a startup feature is supported,
|
|
||||||
///depending on the combination of the desired feature,
|
|
||||||
///the Android version of device, and the WebView APK on the device.
|
|
||||||
///If running on a device with a lower API level, this will always return `false`.
|
|
||||||
///
|
|
||||||
///**Note**: This method is different from [isFeatureSupported] and this method only accepts startup features.
|
|
||||||
///Please verify that the correct feature checking method is used for a particular feature.
|
|
||||||
///
|
|
||||||
///**Note**: If this method returns `false`, it is not safe to invoke the methods requiring the desired feature.
|
|
||||||
///Furthermore, if this method returns `false` for a particular feature,
|
|
||||||
///any callback guarded by that feature will not be invoked.
|
|
||||||
///
|
|
||||||
///**Official Android API**: https://developer.android.com/reference/androidx/webkit/WebViewFeature#isFeatureSupported(java.lang.String)
|
|
||||||
Future<bool> isStartupFeatureSupported(WebViewFeature startupFeature) async {
|
Future<bool> isStartupFeatureSupported(WebViewFeature startupFeature) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
args.putIfAbsent("startupFeature", () => startupFeature.toNativeValue());
|
args.putIfAbsent("startupFeature", () => startupFeature.toNativeValue());
|
||||||
|
@ -10,7 +10,7 @@ part of 'chrome_safari_action_button.dart';
|
|||||||
///
|
///
|
||||||
///**NOTE for Android native WebView**: Not available in an Android Trusted Web Activity.
|
///**NOTE for Android native WebView**: Not available in an Android Trusted Web Activity.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
class ChromeSafariBrowserActionButton {
|
class ChromeSafariBrowserActionButton {
|
||||||
///Use onClick instead.
|
///Use onClick instead.
|
||||||
@ -35,7 +35,7 @@ class ChromeSafariBrowserActionButton {
|
|||||||
///
|
///
|
||||||
///**NOTE for Android native WebView**: Not available in an Android Trusted Web Activity.
|
///**NOTE for Android native WebView**: Not available in an Android Trusted Web Activity.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
ChromeSafariBrowserActionButton(
|
ChromeSafariBrowserActionButton(
|
||||||
{required this.id,
|
{required this.id,
|
||||||
|
@ -10,7 +10,7 @@ part of 'chrome_safari_browser_menu_item.dart';
|
|||||||
///
|
///
|
||||||
///**NOTE for Android native WebView**: Not available in an Android Trusted Web Activity.
|
///**NOTE for Android native WebView**: Not available in an Android Trusted Web Activity.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
class ChromeSafariBrowserMenuItem {
|
class ChromeSafariBrowserMenuItem {
|
||||||
@ -33,7 +33,7 @@ class ChromeSafariBrowserMenuItem {
|
|||||||
///
|
///
|
||||||
///**NOTE for Android native WebView**: Not available in an Android Trusted Web Activity.
|
///**NOTE for Android native WebView**: Not available in an Android Trusted Web Activity.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
ChromeSafariBrowserMenuItem(
|
ChromeSafariBrowserMenuItem(
|
||||||
|
@ -17,7 +17,7 @@ part of 'chrome_safari_browser_secondary_toolbar.dart';
|
|||||||
///
|
///
|
||||||
///**NOTE for Android native WebView**: Not available in an Android Trusted Web Activity.
|
///**NOTE for Android native WebView**: Not available in an Android Trusted Web Activity.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
class ChromeSafariBrowserSecondaryToolbar {
|
class ChromeSafariBrowserSecondaryToolbar {
|
||||||
///The IDs of clickable views. The `onClick` event of these views will be handled by custom tabs.
|
///The IDs of clickable views. The `onClick` event of these views will be handled by custom tabs.
|
||||||
@ -29,7 +29,7 @@ class ChromeSafariBrowserSecondaryToolbar {
|
|||||||
///
|
///
|
||||||
///**NOTE for Android native WebView**: Not available in an Android Trusted Web Activity.
|
///**NOTE for Android native WebView**: Not available in an Android Trusted Web Activity.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
ChromeSafariBrowserSecondaryToolbar(
|
ChromeSafariBrowserSecondaryToolbar(
|
||||||
{this.clickableIDs = const [], required this.layout});
|
{this.clickableIDs = const [], required this.layout});
|
||||||
@ -74,7 +74,7 @@ class ChromeSafariBrowserSecondaryToolbar {
|
|||||||
///
|
///
|
||||||
///**NOTE for Android native WebView**: Not available in an Android Trusted Web Activity.
|
///**NOTE for Android native WebView**: Not available in an Android Trusted Web Activity.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
class ChromeSafariBrowserSecondaryToolbarClickableID {
|
class ChromeSafariBrowserSecondaryToolbarClickableID {
|
||||||
///The android id resource
|
///The android id resource
|
||||||
@ -86,7 +86,7 @@ class ChromeSafariBrowserSecondaryToolbarClickableID {
|
|||||||
///
|
///
|
||||||
///**NOTE for Android native WebView**: Not available in an Android Trusted Web Activity.
|
///**NOTE for Android native WebView**: Not available in an Android Trusted Web Activity.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
ChromeSafariBrowserSecondaryToolbarClickableID(
|
ChromeSafariBrowserSecondaryToolbarClickableID(
|
||||||
{required this.id, this.onClick});
|
{required this.id, this.onClick});
|
||||||
|
@ -62,7 +62,7 @@ class ChromeSafariBrowserSettings_ implements ChromeSafariBrowserOptions {
|
|||||||
///
|
///
|
||||||
///**NOTE**: Not available in a Trusted Web Activity.
|
///**NOTE**: Not available in a Trusted Web Activity.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
CustomTabsShareState_? shareState;
|
CustomTabsShareState_? shareState;
|
||||||
|
|
||||||
@ -70,31 +70,31 @@ class ChromeSafariBrowserSettings_ implements ChromeSafariBrowserOptions {
|
|||||||
///
|
///
|
||||||
///**NOTE**: Not available in a Trusted Web Activity.
|
///**NOTE**: Not available in a Trusted Web Activity.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
bool? showTitle;
|
bool? showTitle;
|
||||||
|
|
||||||
///Set the custom background color of the toolbar.
|
///Set the custom background color of the toolbar.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
Color_? toolbarBackgroundColor;
|
Color_? toolbarBackgroundColor;
|
||||||
|
|
||||||
///Sets the navigation bar color. Has no effect on Android API versions below L.
|
///Sets the navigation bar color. Has no effect on Android API versions below L.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
Color_? navigationBarColor;
|
Color_? navigationBarColor;
|
||||||
|
|
||||||
///Sets the navigation bar divider color. Has no effect on Android API versions below P.
|
///Sets the navigation bar divider color. Has no effect on Android API versions below P.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
Color_? navigationBarDividerColor;
|
Color_? navigationBarDividerColor;
|
||||||
|
|
||||||
///Sets the color of the secondary toolbar.
|
///Sets the color of the secondary toolbar.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
Color_? secondaryToolbarColor;
|
Color_? secondaryToolbarColor;
|
||||||
|
|
||||||
@ -102,7 +102,7 @@ class ChromeSafariBrowserSettings_ implements ChromeSafariBrowserOptions {
|
|||||||
///
|
///
|
||||||
///**NOTE**: Not available in a Trusted Web Activity.
|
///**NOTE**: Not available in a Trusted Web Activity.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
bool? enableUrlBarHiding;
|
bool? enableUrlBarHiding;
|
||||||
|
|
||||||
@ -110,7 +110,7 @@ class ChromeSafariBrowserSettings_ implements ChromeSafariBrowserOptions {
|
|||||||
///
|
///
|
||||||
///**NOTE**: Not available in a Trusted Web Activity.
|
///**NOTE**: Not available in a Trusted Web Activity.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
bool? instantAppsEnabled;
|
bool? instantAppsEnabled;
|
||||||
|
|
||||||
@ -120,31 +120,31 @@ class ChromeSafariBrowserSettings_ implements ChromeSafariBrowserOptions {
|
|||||||
///If non-null, the Intent can only match the components in the given
|
///If non-null, the Intent can only match the components in the given
|
||||||
///application package.
|
///application package.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
String? packageName;
|
String? packageName;
|
||||||
|
|
||||||
///Set to `true` to enable Keep Alive. The default value is `false`.
|
///Set to `true` to enable Keep Alive. The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
bool? keepAliveEnabled;
|
bool? keepAliveEnabled;
|
||||||
|
|
||||||
///Set to `true` to launch the Android activity in `singleInstance` mode. The default value is `false`.
|
///Set to `true` to launch the Android activity in `singleInstance` mode. The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
bool? isSingleInstance;
|
bool? isSingleInstance;
|
||||||
|
|
||||||
///Set to `true` to launch the Android intent with the flag `FLAG_ACTIVITY_NO_HISTORY`. The default value is `false`.
|
///Set to `true` to launch the Android intent with the flag `FLAG_ACTIVITY_NO_HISTORY`. The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
bool? noHistory;
|
bool? noHistory;
|
||||||
|
|
||||||
///Set to `true` to launch the Custom Tab as a Trusted Web Activity. The default value is `false`.
|
///Set to `true` to launch the Custom Tab as a Trusted Web Activity. The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
bool? isTrustedWebActivity;
|
bool? isTrustedWebActivity;
|
||||||
|
|
||||||
@ -152,7 +152,7 @@ class ChromeSafariBrowserSettings_ implements ChromeSafariBrowserOptions {
|
|||||||
///
|
///
|
||||||
///**NOTE**: Available only in a Trusted Web Activity.
|
///**NOTE**: Available only in a Trusted Web Activity.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
List<String>? additionalTrustedOrigins;
|
List<String>? additionalTrustedOrigins;
|
||||||
|
|
||||||
@ -160,7 +160,7 @@ class ChromeSafariBrowserSettings_ implements ChromeSafariBrowserOptions {
|
|||||||
///
|
///
|
||||||
///**NOTE**: Available only in a Trusted Web Activity.
|
///**NOTE**: Available only in a Trusted Web Activity.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
@ExchangeableObjectProperty(deserializer: _deserializeDisplayMode)
|
@ExchangeableObjectProperty(deserializer: _deserializeDisplayMode)
|
||||||
TrustedWebActivityDisplayMode_? displayMode;
|
TrustedWebActivityDisplayMode_? displayMode;
|
||||||
@ -169,7 +169,7 @@ class ChromeSafariBrowserSettings_ implements ChromeSafariBrowserOptions {
|
|||||||
///
|
///
|
||||||
///**NOTE**: Available only in a Trusted Web Activity.
|
///**NOTE**: Available only in a Trusted Web Activity.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
TrustedWebActivityScreenOrientation_? screenOrientation;
|
TrustedWebActivityScreenOrientation_? screenOrientation;
|
||||||
|
|
||||||
@ -177,7 +177,7 @@ class ChromeSafariBrowserSettings_ implements ChromeSafariBrowserOptions {
|
|||||||
///It must contain 2 [AndroidResource], where the first one represents the "enter" animation for the browser
|
///It must contain 2 [AndroidResource], where the first one represents the "enter" animation for the browser
|
||||||
///and the second one represents the "exit" animation for the application.
|
///and the second one represents the "exit" animation for the application.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
List<AndroidResource_>? startAnimations;
|
List<AndroidResource_>? startAnimations;
|
||||||
|
|
||||||
@ -185,7 +185,7 @@ class ChromeSafariBrowserSettings_ implements ChromeSafariBrowserOptions {
|
|||||||
///It must contain 2 [AndroidResource], where the first one represents the "enter" animation for the application
|
///It must contain 2 [AndroidResource], where the first one represents the "enter" animation for the application
|
||||||
///and the second one represents the "exit" animation for the browser.
|
///and the second one represents the "exit" animation for the browser.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
List<AndroidResource_>? exitAnimations;
|
List<AndroidResource_>? exitAnimations;
|
||||||
|
|
||||||
@ -194,19 +194,19 @@ class ChromeSafariBrowserSettings_ implements ChromeSafariBrowserOptions {
|
|||||||
///Calling this with an intent will override any custom tabs related customizations.
|
///Calling this with an intent will override any custom tabs related customizations.
|
||||||
///The default value is `false`.
|
///The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
bool? alwaysUseBrowserUI;
|
bool? alwaysUseBrowserUI;
|
||||||
|
|
||||||
///Set to `true` if Reader mode should be entered automatically when it is available for the webpage. The default value is `false`.
|
///Set to `true` if Reader mode should be entered automatically when it is available for the webpage. The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
bool? entersReaderIfAvailable;
|
bool? entersReaderIfAvailable;
|
||||||
|
|
||||||
///Set to `true` to enable bar collapsing. The default value is `false`.
|
///Set to `true` to enable bar collapsing. The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
bool? barCollapsingEnabled;
|
bool? barCollapsingEnabled;
|
||||||
|
|
||||||
@ -214,7 +214,7 @@ class ChromeSafariBrowserSettings_ implements ChromeSafariBrowserOptions {
|
|||||||
///
|
///
|
||||||
///**NOTE**: available on iOS 11.0+.
|
///**NOTE**: available on iOS 11.0+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
DismissButtonStyle_? dismissButtonStyle;
|
DismissButtonStyle_? dismissButtonStyle;
|
||||||
|
|
||||||
@ -222,7 +222,7 @@ class ChromeSafariBrowserSettings_ implements ChromeSafariBrowserOptions {
|
|||||||
///
|
///
|
||||||
///**NOTE**: available on iOS 10.0+.
|
///**NOTE**: available on iOS 10.0+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
Color_? preferredBarTintColor;
|
Color_? preferredBarTintColor;
|
||||||
|
|
||||||
@ -230,19 +230,19 @@ class ChromeSafariBrowserSettings_ implements ChromeSafariBrowserOptions {
|
|||||||
///
|
///
|
||||||
///**NOTE**: available on iOS 10.0+.
|
///**NOTE**: available on iOS 10.0+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
Color_? preferredControlTintColor;
|
Color_? preferredControlTintColor;
|
||||||
|
|
||||||
///Set the custom modal presentation style when presenting the WebView. The default value is [ModalPresentationStyle.FULL_SCREEN].
|
///Set the custom modal presentation style when presenting the WebView. The default value is [ModalPresentationStyle.FULL_SCREEN].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
ModalPresentationStyle_? presentationStyle;
|
ModalPresentationStyle_? presentationStyle;
|
||||||
|
|
||||||
///Set to the custom transition style when presenting the WebView. The default value is [ModalTransitionStyle.COVER_VERTICAL].
|
///Set to the custom transition style when presenting the WebView. The default value is [ModalTransitionStyle.COVER_VERTICAL].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
ModalTransitionStyle_? transitionStyle;
|
ModalTransitionStyle_? transitionStyle;
|
||||||
|
|
||||||
@ -251,7 +251,7 @@ class ChromeSafariBrowserSettings_ implements ChromeSafariBrowserOptions {
|
|||||||
///
|
///
|
||||||
///**NOTE**: available on iOS 15.0+.
|
///**NOTE**: available on iOS 15.0+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
ActivityButton_? activityButton;
|
ActivityButton_? activityButton;
|
||||||
|
|
||||||
@ -260,7 +260,7 @@ class ChromeSafariBrowserSettings_ implements ChromeSafariBrowserOptions {
|
|||||||
///
|
///
|
||||||
///**NOTE**: available on iOS 15.2+.
|
///**NOTE**: available on iOS 15.2+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
UIEventAttribution_? eventAttribution;
|
UIEventAttribution_? eventAttribution;
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ class ChromeSafariBrowserSettings implements ChromeSafariBrowserOptions {
|
|||||||
///
|
///
|
||||||
///**NOTE**: available on iOS 15.0+.
|
///**NOTE**: available on iOS 15.0+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
ActivityButton? activityButton;
|
ActivityButton? activityButton;
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ class ChromeSafariBrowserSettings implements ChromeSafariBrowserOptions {
|
|||||||
///
|
///
|
||||||
///**NOTE**: Available only in a Trusted Web Activity.
|
///**NOTE**: Available only in a Trusted Web Activity.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
List<String>? additionalTrustedOrigins;
|
List<String>? additionalTrustedOrigins;
|
||||||
|
|
||||||
@ -30,13 +30,13 @@ class ChromeSafariBrowserSettings implements ChromeSafariBrowserOptions {
|
|||||||
///Calling this with an intent will override any custom tabs related customizations.
|
///Calling this with an intent will override any custom tabs related customizations.
|
||||||
///The default value is `false`.
|
///The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
bool? alwaysUseBrowserUI;
|
bool? alwaysUseBrowserUI;
|
||||||
|
|
||||||
///Set to `true` to enable bar collapsing. The default value is `false`.
|
///Set to `true` to enable bar collapsing. The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
bool? barCollapsingEnabled;
|
bool? barCollapsingEnabled;
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ class ChromeSafariBrowserSettings implements ChromeSafariBrowserOptions {
|
|||||||
///
|
///
|
||||||
///**NOTE**: available on iOS 11.0+.
|
///**NOTE**: available on iOS 11.0+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
DismissButtonStyle? dismissButtonStyle;
|
DismissButtonStyle? dismissButtonStyle;
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ class ChromeSafariBrowserSettings implements ChromeSafariBrowserOptions {
|
|||||||
///
|
///
|
||||||
///**NOTE**: Available only in a Trusted Web Activity.
|
///**NOTE**: Available only in a Trusted Web Activity.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
TrustedWebActivityDisplayMode? displayMode;
|
TrustedWebActivityDisplayMode? displayMode;
|
||||||
|
|
||||||
@ -60,13 +60,13 @@ class ChromeSafariBrowserSettings implements ChromeSafariBrowserOptions {
|
|||||||
///
|
///
|
||||||
///**NOTE**: Not available in a Trusted Web Activity.
|
///**NOTE**: Not available in a Trusted Web Activity.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
bool? enableUrlBarHiding;
|
bool? enableUrlBarHiding;
|
||||||
|
|
||||||
///Set to `true` if Reader mode should be entered automatically when it is available for the webpage. The default value is `false`.
|
///Set to `true` if Reader mode should be entered automatically when it is available for the webpage. The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
bool? entersReaderIfAvailable;
|
bool? entersReaderIfAvailable;
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ class ChromeSafariBrowserSettings implements ChromeSafariBrowserOptions {
|
|||||||
///
|
///
|
||||||
///**NOTE**: available on iOS 15.2+.
|
///**NOTE**: available on iOS 15.2+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
UIEventAttribution? eventAttribution;
|
UIEventAttribution? eventAttribution;
|
||||||
|
|
||||||
@ -83,7 +83,7 @@ class ChromeSafariBrowserSettings implements ChromeSafariBrowserOptions {
|
|||||||
///It must contain 2 [AndroidResource], where the first one represents the "enter" animation for the application
|
///It must contain 2 [AndroidResource], where the first one represents the "enter" animation for the application
|
||||||
///and the second one represents the "exit" animation for the browser.
|
///and the second one represents the "exit" animation for the browser.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
List<AndroidResource>? exitAnimations;
|
List<AndroidResource>? exitAnimations;
|
||||||
|
|
||||||
@ -91,43 +91,43 @@ class ChromeSafariBrowserSettings implements ChromeSafariBrowserOptions {
|
|||||||
///
|
///
|
||||||
///**NOTE**: Not available in a Trusted Web Activity.
|
///**NOTE**: Not available in a Trusted Web Activity.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
bool? instantAppsEnabled;
|
bool? instantAppsEnabled;
|
||||||
|
|
||||||
///Set to `true` to launch the Android activity in `singleInstance` mode. The default value is `false`.
|
///Set to `true` to launch the Android activity in `singleInstance` mode. The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
bool? isSingleInstance;
|
bool? isSingleInstance;
|
||||||
|
|
||||||
///Set to `true` to launch the Custom Tab as a Trusted Web Activity. The default value is `false`.
|
///Set to `true` to launch the Custom Tab as a Trusted Web Activity. The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
bool? isTrustedWebActivity;
|
bool? isTrustedWebActivity;
|
||||||
|
|
||||||
///Set to `true` to enable Keep Alive. The default value is `false`.
|
///Set to `true` to enable Keep Alive. The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
bool? keepAliveEnabled;
|
bool? keepAliveEnabled;
|
||||||
|
|
||||||
///Sets the navigation bar color. Has no effect on Android API versions below L.
|
///Sets the navigation bar color. Has no effect on Android API versions below L.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
Color? navigationBarColor;
|
Color? navigationBarColor;
|
||||||
|
|
||||||
///Sets the navigation bar divider color. Has no effect on Android API versions below P.
|
///Sets the navigation bar divider color. Has no effect on Android API versions below P.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
Color? navigationBarDividerColor;
|
Color? navigationBarDividerColor;
|
||||||
|
|
||||||
///Set to `true` to launch the Android intent with the flag `FLAG_ACTIVITY_NO_HISTORY`. The default value is `false`.
|
///Set to `true` to launch the Android intent with the flag `FLAG_ACTIVITY_NO_HISTORY`. The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
bool? noHistory;
|
bool? noHistory;
|
||||||
|
|
||||||
@ -137,7 +137,7 @@ class ChromeSafariBrowserSettings implements ChromeSafariBrowserOptions {
|
|||||||
///If non-null, the Intent can only match the components in the given
|
///If non-null, the Intent can only match the components in the given
|
||||||
///application package.
|
///application package.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
String? packageName;
|
String? packageName;
|
||||||
|
|
||||||
@ -145,7 +145,7 @@ class ChromeSafariBrowserSettings implements ChromeSafariBrowserOptions {
|
|||||||
///
|
///
|
||||||
///**NOTE**: available on iOS 10.0+.
|
///**NOTE**: available on iOS 10.0+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
Color? preferredBarTintColor;
|
Color? preferredBarTintColor;
|
||||||
|
|
||||||
@ -153,13 +153,13 @@ class ChromeSafariBrowserSettings implements ChromeSafariBrowserOptions {
|
|||||||
///
|
///
|
||||||
///**NOTE**: available on iOS 10.0+.
|
///**NOTE**: available on iOS 10.0+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
Color? preferredControlTintColor;
|
Color? preferredControlTintColor;
|
||||||
|
|
||||||
///Set the custom modal presentation style when presenting the WebView. The default value is [ModalPresentationStyle.FULL_SCREEN].
|
///Set the custom modal presentation style when presenting the WebView. The default value is [ModalPresentationStyle.FULL_SCREEN].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
ModalPresentationStyle? presentationStyle;
|
ModalPresentationStyle? presentationStyle;
|
||||||
|
|
||||||
@ -167,13 +167,13 @@ class ChromeSafariBrowserSettings implements ChromeSafariBrowserOptions {
|
|||||||
///
|
///
|
||||||
///**NOTE**: Available only in a Trusted Web Activity.
|
///**NOTE**: Available only in a Trusted Web Activity.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
TrustedWebActivityScreenOrientation? screenOrientation;
|
TrustedWebActivityScreenOrientation? screenOrientation;
|
||||||
|
|
||||||
///Sets the color of the secondary toolbar.
|
///Sets the color of the secondary toolbar.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
Color? secondaryToolbarColor;
|
Color? secondaryToolbarColor;
|
||||||
|
|
||||||
@ -181,7 +181,7 @@ class ChromeSafariBrowserSettings implements ChromeSafariBrowserOptions {
|
|||||||
///
|
///
|
||||||
///**NOTE**: Not available in a Trusted Web Activity.
|
///**NOTE**: Not available in a Trusted Web Activity.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
CustomTabsShareState? shareState;
|
CustomTabsShareState? shareState;
|
||||||
|
|
||||||
@ -189,7 +189,7 @@ class ChromeSafariBrowserSettings implements ChromeSafariBrowserOptions {
|
|||||||
///
|
///
|
||||||
///**NOTE**: Not available in a Trusted Web Activity.
|
///**NOTE**: Not available in a Trusted Web Activity.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
bool? showTitle;
|
bool? showTitle;
|
||||||
|
|
||||||
@ -197,19 +197,19 @@ class ChromeSafariBrowserSettings implements ChromeSafariBrowserOptions {
|
|||||||
///It must contain 2 [AndroidResource], where the first one represents the "enter" animation for the browser
|
///It must contain 2 [AndroidResource], where the first one represents the "enter" animation for the browser
|
||||||
///and the second one represents the "exit" animation for the application.
|
///and the second one represents the "exit" animation for the application.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
List<AndroidResource>? startAnimations;
|
List<AndroidResource>? startAnimations;
|
||||||
|
|
||||||
///Set the custom background color of the toolbar.
|
///Set the custom background color of the toolbar.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
Color? toolbarBackgroundColor;
|
Color? toolbarBackgroundColor;
|
||||||
|
|
||||||
///Set to the custom transition style when presenting the WebView. The default value is [ModalTransitionStyle.COVER_VERTICAL].
|
///Set to the custom transition style when presenting the WebView. The default value is [ModalTransitionStyle.COVER_VERTICAL].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
ModalTransitionStyle? transitionStyle;
|
ModalTransitionStyle? transitionStyle;
|
||||||
ChromeSafariBrowserSettings(
|
ChromeSafariBrowserSettings(
|
||||||
|
@ -14,6 +14,12 @@ class PlatformChromeSafariBrowserCreationParams {
|
|||||||
const PlatformChromeSafariBrowserCreationParams();
|
const PlatformChromeSafariBrowserCreationParams();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformChromeSafariBrowser}
|
||||||
|
///Class that provides a visible standard interface for browsing the web.
|
||||||
|
///It presents a self-contained web interface inside your app.
|
||||||
|
///
|
||||||
|
///If you need to customize or interact with the web content, use the `InAppWebView` widget.
|
||||||
|
///
|
||||||
///This class uses native [Chrome Custom Tabs](https://developer.android.com/reference/android/support/customtabs/package-summary) on Android
|
///This class uses native [Chrome Custom Tabs](https://developer.android.com/reference/android/support/customtabs/package-summary) on Android
|
||||||
///and [SFSafariViewController](https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller) on iOS.
|
///and [SFSafariViewController](https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller) on iOS.
|
||||||
///
|
///
|
||||||
@ -21,9 +27,10 @@ class PlatformChromeSafariBrowserCreationParams {
|
|||||||
///`android.support.customtabs.action.CustomTabsService` in your `AndroidManifest.xml`
|
///`android.support.customtabs.action.CustomTabsService` in your `AndroidManifest.xml`
|
||||||
///(you can read more about it here: https://developers.google.com/web/android/custom-tabs/best-practices#applications_targeting_android_11_api_level_30_or_above).
|
///(you can read more about it here: https://developers.google.com/web/android/custom-tabs/best-practices#applications_targeting_android_11_api_level_30_or_above).
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
///- iOS
|
///- iOS
|
||||||
|
///{@endtemplate}
|
||||||
abstract class PlatformChromeSafariBrowser extends PlatformInterface
|
abstract class PlatformChromeSafariBrowser extends PlatformInterface
|
||||||
implements Disposable {
|
implements Disposable {
|
||||||
///Debug settings.
|
///Debug settings.
|
||||||
@ -85,6 +92,7 @@ abstract class PlatformChromeSafariBrowser extends PlatformInterface
|
|||||||
/// The parameters used to initialize the [PlatformChromeSafariBrowser].
|
/// The parameters used to initialize the [PlatformChromeSafariBrowser].
|
||||||
final PlatformChromeSafariBrowserCreationParams params;
|
final PlatformChromeSafariBrowserCreationParams params;
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformChromeSafariBrowser.open}
|
||||||
///Opens the [PlatformChromeSafariBrowser] instance with an [url].
|
///Opens the [PlatformChromeSafariBrowser] instance with an [url].
|
||||||
///
|
///
|
||||||
///[url] - The [url] to load. On iOS, the [url] is required and must use the `http` or `https` scheme.
|
///[url] - The [url] to load. On iOS, the [url] is required and must use the `http` or `https` scheme.
|
||||||
@ -101,9 +109,10 @@ abstract class PlatformChromeSafariBrowser extends PlatformInterface
|
|||||||
///
|
///
|
||||||
///[settings] - Settings for the [PlatformChromeSafariBrowser].
|
///[settings] - Settings for the [PlatformChromeSafariBrowser].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
///- iOS
|
///- iOS
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> open(
|
Future<void> open(
|
||||||
{WebUri? url,
|
{WebUri? url,
|
||||||
Map<String, String>? headers,
|
Map<String, String>? headers,
|
||||||
@ -116,6 +125,7 @@ abstract class PlatformChromeSafariBrowser extends PlatformInterface
|
|||||||
throw UnimplementedError('open is not implemented on the current platform');
|
throw UnimplementedError('open is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformChromeSafariBrowser.launchUrl}
|
||||||
///Tells the browser to launch with [url].
|
///Tells the browser to launch with [url].
|
||||||
///
|
///
|
||||||
///[url] - initial url.
|
///[url] - initial url.
|
||||||
@ -128,8 +138,9 @@ abstract class PlatformChromeSafariBrowser extends PlatformInterface
|
|||||||
///
|
///
|
||||||
///[referrer] - referrer header. Supported only on Android.
|
///[referrer] - referrer header. Supported only on Android.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> launchUrl({
|
Future<void> launchUrl({
|
||||||
required WebUri url,
|
required WebUri url,
|
||||||
Map<String, String>? headers,
|
Map<String, String>? headers,
|
||||||
@ -140,6 +151,7 @@ abstract class PlatformChromeSafariBrowser extends PlatformInterface
|
|||||||
'launchUrl is not implemented on the current platform');
|
'launchUrl is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformChromeSafariBrowser.mayLaunchUrl}
|
||||||
///Tells the browser of a likely future navigation to a URL.
|
///Tells the browser of a likely future navigation to a URL.
|
||||||
///The most likely URL has to be specified first.
|
///The most likely URL has to be specified first.
|
||||||
///Optionally, a list of other likely URLs can be provided.
|
///Optionally, a list of other likely URLs can be provided.
|
||||||
@ -150,19 +162,21 @@ abstract class PlatformChromeSafariBrowser extends PlatformInterface
|
|||||||
///
|
///
|
||||||
///[otherLikelyURLs] - Other likely destinations, sorted in decreasing likelihood order.
|
///[otherLikelyURLs] - Other likely destinations, sorted in decreasing likelihood order.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android ([Official API - CustomTabsSession.mayLaunchUrl](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsSession#mayLaunchUrl(android.net.Uri,android.os.Bundle,java.util.List%3Candroid.os.Bundle%3E)))
|
///- Android ([Official API - CustomTabsSession.mayLaunchUrl](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsSession#mayLaunchUrl(android.net.Uri,android.os.Bundle,java.util.List%3Candroid.os.Bundle%3E)))
|
||||||
|
///{@endtemplate}
|
||||||
Future<bool> mayLaunchUrl({WebUri? url, List<WebUri>? otherLikelyURLs}) {
|
Future<bool> mayLaunchUrl({WebUri? url, List<WebUri>? otherLikelyURLs}) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'mayLaunchUrl is not implemented on the current platform');
|
'mayLaunchUrl is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformChromeSafariBrowser.validateRelationship}
|
||||||
///Requests to validate a relationship between the application and an origin.
|
///Requests to validate a relationship between the application and an origin.
|
||||||
///
|
///
|
||||||
///See [here](https://developers.google.com/digital-asset-links/v1/getting-started) for documentation about Digital Asset Links.
|
///See [here](https://developers.google.com/digital-asset-links/v1/getting-started) for documentation about Digital Asset Links.
|
||||||
///This methods requests the browser to verify a relation with the calling application, to grant the associated rights.
|
///This methods requests the browser to verify a relation with the calling application, to grant the associated rights.
|
||||||
///
|
///
|
||||||
///If this method returns `true`, the validation result will be provided through [onRelationshipValidationResult].
|
///If this method returns `true`, the validation result will be provided through [PlatformChromeSafariBrowserEvents.onRelationshipValidationResult].
|
||||||
///Otherwise the request didn't succeed.
|
///Otherwise the request didn't succeed.
|
||||||
///
|
///
|
||||||
///[relation] – Relation to check, must be one of the [CustomTabsRelationType] constants.
|
///[relation] – Relation to check, must be one of the [CustomTabsRelationType] constants.
|
||||||
@ -171,95 +185,111 @@ abstract class PlatformChromeSafariBrowser extends PlatformInterface
|
|||||||
///
|
///
|
||||||
///[extras] – Reserved for future use.
|
///[extras] – Reserved for future use.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android ([Official API - CustomTabsSession.validateRelationship](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsSession#validateRelationship(int,android.net.Uri,android.os.Bundle)))
|
///- Android ([Official API - CustomTabsSession.validateRelationship](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsSession#validateRelationship(int,android.net.Uri,android.os.Bundle)))
|
||||||
|
///{@endtemplate}
|
||||||
Future<bool> validateRelationship(
|
Future<bool> validateRelationship(
|
||||||
{required CustomTabsRelationType relation, required WebUri origin}) {
|
{required CustomTabsRelationType relation, required WebUri origin}) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'validateRelationship is not implemented on the current platform');
|
'validateRelationship is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformChromeSafariBrowser.close}
|
||||||
///Closes the [PlatformChromeSafariBrowser] instance.
|
///Closes the [PlatformChromeSafariBrowser] instance.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
///- iOS
|
///- iOS
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> close() {
|
Future<void> close() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'close is not implemented on the current platform');
|
'close is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformChromeSafariBrowser.setActionButton}
|
||||||
///Set a custom action button.
|
///Set a custom action button.
|
||||||
///
|
///
|
||||||
///**NOTE**: Not available in a Trusted Web Activity.
|
///**NOTE**: Not available in a Trusted Web Activity.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android ([Official API - CustomTabsIntent.Builder.setActionButton](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsIntent.Builder#setActionButton(android.graphics.Bitmap,%20java.lang.String,%20android.app.PendingIntent,%20boolean)))
|
///- Android ([Official API - CustomTabsIntent.Builder.setActionButton](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsIntent.Builder#setActionButton(android.graphics.Bitmap,%20java.lang.String,%20android.app.PendingIntent,%20boolean)))
|
||||||
|
///{@endtemplate}
|
||||||
void setActionButton(ChromeSafariBrowserActionButton actionButton) {
|
void setActionButton(ChromeSafariBrowserActionButton actionButton) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'setActionButton is not implemented on the current platform');
|
'setActionButton is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformChromeSafariBrowser.updateActionButton}
|
||||||
///Updates the [ChromeSafariBrowserActionButton.icon] and [ChromeSafariBrowserActionButton.description].
|
///Updates the [ChromeSafariBrowserActionButton.icon] and [ChromeSafariBrowserActionButton.description].
|
||||||
///
|
///
|
||||||
///**NOTE**: Not available in a Trusted Web Activity.
|
///**NOTE**: Not available in a Trusted Web Activity.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android ([Official API - CustomTabsSession.setActionButton](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsSession#setActionButton(android.graphics.Bitmap,java.lang.String)))
|
///- Android ([Official API - CustomTabsSession.setActionButton](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsSession#setActionButton(android.graphics.Bitmap,java.lang.String)))
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> updateActionButton(
|
Future<void> updateActionButton(
|
||||||
{required Uint8List icon, required String description}) {
|
{required Uint8List icon, required String description}) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'updateActionButton is not implemented on the current platform');
|
'updateActionButton is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformChromeSafariBrowser.setSecondaryToolbar}
|
||||||
///Sets the remote views displayed in the secondary toolbar in a custom tab.
|
///Sets the remote views displayed in the secondary toolbar in a custom tab.
|
||||||
///
|
///
|
||||||
///**NOTE**: Not available in a Trusted Web Activity.
|
///**NOTE**: Not available in a Trusted Web Activity.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android ([Official API - CustomTabsIntent.Builder.setSecondaryToolbarViews](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsIntent.Builder#setSecondaryToolbarViews(android.widget.RemoteViews,int[],android.app.PendingIntent)))
|
///- Android ([Official API - CustomTabsIntent.Builder.setSecondaryToolbarViews](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsIntent.Builder#setSecondaryToolbarViews(android.widget.RemoteViews,int[],android.app.PendingIntent)))
|
||||||
|
///{@endtemplate}
|
||||||
void setSecondaryToolbar(
|
void setSecondaryToolbar(
|
||||||
ChromeSafariBrowserSecondaryToolbar secondaryToolbar) {
|
ChromeSafariBrowserSecondaryToolbar secondaryToolbar) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'setSecondaryToolbar is not implemented on the current platform');
|
'setSecondaryToolbar is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformChromeSafariBrowser.updateSecondaryToolbar}
|
||||||
///Sets or updates (if already present) the Remote Views of the secondary toolbar in an existing custom tab session.
|
///Sets or updates (if already present) the Remote Views of the secondary toolbar in an existing custom tab session.
|
||||||
///
|
///
|
||||||
///**NOTE**: Not available in a Trusted Web Activity.
|
///**NOTE**: Not available in a Trusted Web Activity.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android ([Official API - CustomTabsSession.setSecondaryToolbarViews](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsSession#setSecondaryToolbarViews(android.widget.RemoteViews,int[],android.app.PendingIntent)))
|
///- Android ([Official API - CustomTabsSession.setSecondaryToolbarViews](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsSession#setSecondaryToolbarViews(android.widget.RemoteViews,int[],android.app.PendingIntent)))
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> updateSecondaryToolbar(
|
Future<void> updateSecondaryToolbar(
|
||||||
ChromeSafariBrowserSecondaryToolbar secondaryToolbar) {
|
ChromeSafariBrowserSecondaryToolbar secondaryToolbar) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'updateSecondaryToolbar is not implemented on the current platform');
|
'updateSecondaryToolbar is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformChromeSafariBrowser.addMenuItem}
|
||||||
///Adds a [ChromeSafariBrowserMenuItem] to the menu.
|
///Adds a [ChromeSafariBrowserMenuItem] to the menu.
|
||||||
///
|
///
|
||||||
///**NOTE**: Not available in an Android Trusted Web Activity.
|
///**NOTE**: Not available in an Android Trusted Web Activity.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
///- iOS
|
///- iOS
|
||||||
|
///{@endtemplate}
|
||||||
void addMenuItem(ChromeSafariBrowserMenuItem menuItem) {
|
void addMenuItem(ChromeSafariBrowserMenuItem menuItem) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'addMenuItem is not implemented on the current platform');
|
'addMenuItem is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformChromeSafariBrowser.addMenuItems}
|
||||||
///Adds a list of [ChromeSafariBrowserMenuItem] to the menu.
|
///Adds a list of [ChromeSafariBrowserMenuItem] to the menu.
|
||||||
///
|
///
|
||||||
///**NOTE**: Not available in an Android Trusted Web Activity.
|
///**NOTE**: Not available in an Android Trusted Web Activity.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
///- iOS
|
///- iOS
|
||||||
|
///{@endtemplate}
|
||||||
void addMenuItems(List<ChromeSafariBrowserMenuItem> menuItems) {
|
void addMenuItems(List<ChromeSafariBrowserMenuItem> menuItems) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'addMenuItems is not implemented on the current platform');
|
'addMenuItems is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformChromeSafariBrowser.requestPostMessageChannel}
|
||||||
///Sends a request to create a two way postMessage channel between the client
|
///Sends a request to create a two way postMessage channel between the client
|
||||||
///and the browser.
|
///and the browser.
|
||||||
///If you want to specifying the target origin to communicate with, set the [targetOrigin].
|
///If you want to specifying the target origin to communicate with, set the [targetOrigin].
|
||||||
@ -275,74 +305,86 @@ abstract class PlatformChromeSafariBrowser extends PlatformInterface
|
|||||||
///Note that returning true here doesn't mean an origin has already been
|
///Note that returning true here doesn't mean an origin has already been
|
||||||
///assigned as the validation is asynchronous.
|
///assigned as the validation is asynchronous.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android ([Official API - CustomTabsSession.requestPostMessageChannel](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsSession#requestPostMessageChannel(android.net.Uri,android.net.Uri,android.os.Bundle)))
|
///- Android ([Official API - CustomTabsSession.requestPostMessageChannel](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsSession#requestPostMessageChannel(android.net.Uri,android.net.Uri,android.os.Bundle)))
|
||||||
|
///{@endtemplate}
|
||||||
Future<bool> requestPostMessageChannel(
|
Future<bool> requestPostMessageChannel(
|
||||||
{required WebUri sourceOrigin, WebUri? targetOrigin}) {
|
{required WebUri sourceOrigin, WebUri? targetOrigin}) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'requestPostMessageChannel is not implemented on the current platform');
|
'requestPostMessageChannel is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformChromeSafariBrowser.postMessage}
|
||||||
///Sends a postMessage request using the origin communicated via [requestPostMessageChannel].
|
///Sends a postMessage request using the origin communicated via [requestPostMessageChannel].
|
||||||
///Fails when called before [onMessageChannelReady] event.
|
///Fails when called before [PlatformChromeSafariBrowserEvents.onMessageChannelReady] event.
|
||||||
///
|
///
|
||||||
///[message] – The message that is being sent.
|
///[message] – The message that is being sent.
|
||||||
///
|
///
|
||||||
///Returns an integer constant about the postMessage request result.
|
///Returns an integer constant about the postMessage request result.
|
||||||
///Will return CustomTabsService.RESULT_SUCCESS if successful.
|
///Will return CustomTabsService.RESULT_SUCCESS if successful.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android ([Official API - CustomTabsSession.postMessage](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsSession#postMessage(java.lang.String,android.os.Bundle)))
|
///- Android ([Official API - CustomTabsSession.postMessage](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsSession#postMessage(java.lang.String,android.os.Bundle)))
|
||||||
|
///{@endtemplate}
|
||||||
Future<CustomTabsPostMessageResultType> postMessage(String message) {
|
Future<CustomTabsPostMessageResultType> postMessage(String message) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'postMessage is not implemented on the current platform');
|
'postMessage is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformChromeSafariBrowser.isEngagementSignalsApiAvailable}
|
||||||
///Returns whether the Engagement Signals API is available.
|
///Returns whether the Engagement Signals API is available.
|
||||||
///The availability of the Engagement Signals API may change at runtime.
|
///The availability of the Engagement Signals API may change at runtime.
|
||||||
///If an EngagementSignalsCallback has been set, an [onSessionEnded]
|
///If an EngagementSignalsCallback has been set, an [PlatformChromeSafariBrowserEvents.onSessionEnded]
|
||||||
///signal will be sent if the API becomes unavailable later.
|
///signal will be sent if the API becomes unavailable later.
|
||||||
///
|
///
|
||||||
///Returns whether the Engagement Signals API is available.
|
///Returns whether the Engagement Signals API is available.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android ([Official API - CustomTabsSession.isEngagementSignalsApiAvailable](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsSession#isEngagementSignalsApiAvailable(android.os.Bundle)))
|
///- Android ([Official API - CustomTabsSession.isEngagementSignalsApiAvailable](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsSession#isEngagementSignalsApiAvailable(android.os.Bundle)))
|
||||||
|
///{@endtemplate}
|
||||||
Future<bool> isEngagementSignalsApiAvailable() {
|
Future<bool> isEngagementSignalsApiAvailable() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'isEngagementSignalsApiAvailable is not implemented on the current platform');
|
'isEngagementSignalsApiAvailable is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformChromeSafariBrowser.isOpened}
|
||||||
///Returns `true` if the [PlatformChromeSafariBrowser] instance is opened, otherwise `false`.
|
///Returns `true` if the [PlatformChromeSafariBrowser] instance is opened, otherwise `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
///- iOS
|
///- iOS
|
||||||
|
///{@endtemplate}
|
||||||
bool isOpened() {
|
bool isOpened() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'isOpened is not implemented on the current platform');
|
'isOpened is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformChromeSafariBrowser.isAvailable}
|
||||||
///On Android, returns `true` if Chrome Custom Tabs is available.
|
///On Android, returns `true` if Chrome Custom Tabs is available.
|
||||||
///On iOS, returns `true` if SFSafariViewController is available.
|
///On iOS, returns `true` if SFSafariViewController is available.
|
||||||
///Otherwise returns `false`.
|
///Otherwise returns `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
///- iOS
|
///- iOS
|
||||||
|
///{@endtemplate}
|
||||||
Future<bool> isAvailable() {
|
Future<bool> isAvailable() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'isAvailable is not implemented on the current platform');
|
'isAvailable is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformChromeSafariBrowser.getMaxToolbarItems}
|
||||||
///The maximum number of allowed secondary toolbar items.
|
///The maximum number of allowed secondary toolbar items.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
|
///{@endtemplate}
|
||||||
Future<int> getMaxToolbarItems() {
|
Future<int> getMaxToolbarItems() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'getMaxToolbarItems is not implemented on the current platform');
|
'getMaxToolbarItems is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformChromeSafariBrowser.getPackageName}
|
||||||
///Returns the preferred package to use for Custom Tabs.
|
///Returns the preferred package to use for Custom Tabs.
|
||||||
///The preferred package name is the default VIEW intent handler as long as it supports Custom Tabs.
|
///The preferred package name is the default VIEW intent handler as long as it supports Custom Tabs.
|
||||||
///To modify this preferred behavior, set [ignoreDefault] to `true` and give a
|
///To modify this preferred behavior, set [ignoreDefault] to `true` and give a
|
||||||
@ -357,26 +399,30 @@ abstract class PlatformChromeSafariBrowser extends PlatformInterface
|
|||||||
///
|
///
|
||||||
///Returns the preferred package name for handling Custom Tabs, or null.
|
///Returns the preferred package name for handling Custom Tabs, or null.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android ([Official API - CustomTabsClient.getPackageName](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsClient#getPackageName(android.content.Context,java.util.List%3Cjava.lang.String%3E,boolean))))
|
///- Android ([Official API - CustomTabsClient.getPackageName](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsClient#getPackageName(android.content.Context,java.util.List%3Cjava.lang.String%3E,boolean))))
|
||||||
|
///{@endtemplate}
|
||||||
Future<String?> getPackageName(
|
Future<String?> getPackageName(
|
||||||
{List<String>? packages, bool ignoreDefault = false}) {
|
{List<String>? packages, bool ignoreDefault = false}) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'getPackageName is not implemented on the current platform');
|
'getPackageName is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformChromeSafariBrowser.clearWebsiteData}
|
||||||
///Clear associated website data accrued from browsing activity within your app.
|
///Clear associated website data accrued from browsing activity within your app.
|
||||||
///This includes all local storage, cached resources, and cookies.
|
///This includes all local storage, cached resources, and cookies.
|
||||||
///
|
///
|
||||||
///**NOTE for iOS**: available on iOS 16.0+.
|
///**NOTE for iOS**: available on iOS 16.0+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - SFSafariViewController.DataStore.clearWebsiteData](https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller/datastore/3981117-clearwebsitedata))
|
///- iOS ([Official API - SFSafariViewController.DataStore.clearWebsiteData](https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller/datastore/3981117-clearwebsitedata))
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> clearWebsiteData() {
|
Future<void> clearWebsiteData() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'clearWebsiteData is not implemented on the current platform');
|
'clearWebsiteData is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformChromeSafariBrowser.prewarmConnections}
|
||||||
///Prewarms a connection to each URL. SFSafariViewController will automatically use a
|
///Prewarms a connection to each URL. SFSafariViewController will automatically use a
|
||||||
///prewarmed connection if possible when loading its initial URL.
|
///prewarmed connection if possible when loading its initial URL.
|
||||||
///
|
///
|
||||||
@ -395,25 +441,30 @@ abstract class PlatformChromeSafariBrowser extends PlatformInterface
|
|||||||
///
|
///
|
||||||
///**NOTE for iOS**: available on iOS 15.0+.
|
///**NOTE for iOS**: available on iOS 15.0+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - SFSafariViewController.prewarmConnections](https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller/3752133-prewarmconnections))
|
///- iOS ([Official API - SFSafariViewController.prewarmConnections](https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller/3752133-prewarmconnections))
|
||||||
|
///{@endtemplate}
|
||||||
Future<PrewarmingToken?> prewarmConnections(List<WebUri> URLs) {
|
Future<PrewarmingToken?> prewarmConnections(List<WebUri> URLs) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'prewarmConnections is not implemented on the current platform');
|
'prewarmConnections is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformChromeSafariBrowser.invalidatePrewarmingToken}
|
||||||
///Ends all prewarmed connections associated with the token, except for connections that are also kept alive by other tokens.
|
///Ends all prewarmed connections associated with the token, except for connections that are also kept alive by other tokens.
|
||||||
///
|
///
|
||||||
///**NOTE for iOS**: available on iOS 15.0+.
|
///**NOTE for iOS**: available on iOS 15.0+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - SFSafariViewController.prewarmConnections](https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller/3752133-prewarmconnections))
|
///- iOS ([Official API - SFSafariViewController.prewarmConnections](https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller/3752133-prewarmconnections))
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> invalidatePrewarmingToken(PrewarmingToken prewarmingToken) {
|
Future<void> invalidatePrewarmingToken(PrewarmingToken prewarmingToken) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'invalidatePrewarmingToken is not implemented on the current platform');
|
'invalidatePrewarmingToken is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformChromeSafariBrowser.dispose}
|
||||||
///Disposes the channel.
|
///Disposes the channel.
|
||||||
|
///{@endtemplate}
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
@ -422,87 +473,108 @@ abstract class PlatformChromeSafariBrowser extends PlatformInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
abstract class PlatformChromeSafariBrowserEvents {
|
abstract class PlatformChromeSafariBrowserEvents {
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformChromeSafariBrowser.onServiceConnected}
|
||||||
///Event fired when the when connecting from Android Custom Tabs Service.
|
///Event fired when the when connecting from Android Custom Tabs Service.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
|
///{@endtemplate}
|
||||||
void onServiceConnected() {}
|
void onServiceConnected() {}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformChromeSafariBrowser.onOpened}
|
||||||
///Event fired when the [PlatformChromeSafariBrowser] is opened.
|
///Event fired when the [PlatformChromeSafariBrowser] is opened.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
///- iOS
|
///- iOS
|
||||||
|
///{@endtemplate}
|
||||||
void onOpened() {}
|
void onOpened() {}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformChromeSafariBrowser.onCompletedInitialLoad}
|
||||||
///Event fired when the initial URL load is complete.
|
///Event fired when the initial URL load is complete.
|
||||||
///
|
///
|
||||||
///[didLoadSuccessfully] - `true` if loading completed successfully; otherwise, `false`. Supported only on iOS.
|
///[didLoadSuccessfully] - `true` if loading completed successfully; otherwise, `false`. Supported only on iOS.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
///- iOS ([Official API - SFSafariViewControllerDelegate.safariViewController](https://developer.apple.com/documentation/safariservices/sfsafariviewcontrollerdelegate/1621215-safariviewcontroller))
|
///- iOS ([Official API - SFSafariViewControllerDelegate.safariViewController](https://developer.apple.com/documentation/safariservices/sfsafariviewcontrollerdelegate/1621215-safariviewcontroller))
|
||||||
|
///{@endtemplate}
|
||||||
void onCompletedInitialLoad(bool? didLoadSuccessfully) {}
|
void onCompletedInitialLoad(bool? didLoadSuccessfully) {}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformChromeSafariBrowser.onInitialLoadDidRedirect}
|
||||||
///Event fired when the initial URL load is complete.
|
///Event fired when the initial URL load is complete.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - SFSafariViewControllerDelegate.safariViewController](https://developer.apple.com/documentation/safariservices/sfsafariviewcontrollerdelegate/2923545-safariviewcontroller))
|
///- iOS ([Official API - SFSafariViewControllerDelegate.safariViewController](https://developer.apple.com/documentation/safariservices/sfsafariviewcontrollerdelegate/2923545-safariviewcontroller))
|
||||||
|
///{@endtemplate}
|
||||||
void onInitialLoadDidRedirect(WebUri? url) {}
|
void onInitialLoadDidRedirect(WebUri? url) {}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformChromeSafariBrowser.onNavigationEvent}
|
||||||
///Event fired when a navigation event happens.
|
///Event fired when a navigation event happens.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android ([Official API - CustomTabsCallback.onNavigationEvent](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsCallback#onNavigationEvent(int,android.os.Bundle)))
|
///- Android ([Official API - CustomTabsCallback.onNavigationEvent](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsCallback#onNavigationEvent(int,android.os.Bundle)))
|
||||||
|
///{@endtemplate}
|
||||||
void onNavigationEvent(CustomTabsNavigationEventType? navigationEvent) {}
|
void onNavigationEvent(CustomTabsNavigationEventType? navigationEvent) {}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformChromeSafariBrowser.onRelationshipValidationResult}
|
||||||
///Event fired when a relationship validation result is available.
|
///Event fired when a relationship validation result is available.
|
||||||
///
|
///
|
||||||
///[relation] - Relation for which the result is available. Value previously passed to [validateRelationship].
|
///[relation] - Relation for which the result is available. Value previously passed to [PlatformChromeSafariBrowser.validateRelationship].
|
||||||
///
|
///
|
||||||
///[requestedOrigin] - Origin requested. Value previously passed to [validateRelationship].
|
///[requestedOrigin] - Origin requested. Value previously passed to [PlatformChromeSafariBrowser.validateRelationship].
|
||||||
///
|
///
|
||||||
///[result] - Whether the relation was validated.
|
///[result] - Whether the relation was validated.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android ([Official API - CustomTabsCallback.onRelationshipValidationResult](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsCallback#onRelationshipValidationResult(int,android.net.Uri,boolean,android.os.Bundle)))
|
///- Android ([Official API - CustomTabsCallback.onRelationshipValidationResult](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsCallback#onRelationshipValidationResult(int,android.net.Uri,boolean,android.os.Bundle)))
|
||||||
|
///{@endtemplate}
|
||||||
void onRelationshipValidationResult(
|
void onRelationshipValidationResult(
|
||||||
CustomTabsRelationType? relation, WebUri? requestedOrigin, bool result) {}
|
CustomTabsRelationType? relation, WebUri? requestedOrigin, bool result) {}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformChromeSafariBrowser.onWillOpenInBrowser}
|
||||||
///Event fired when the user opens the current page in the default browser by tapping the toolbar button.
|
///Event fired when the user opens the current page in the default browser by tapping the toolbar button.
|
||||||
///
|
///
|
||||||
///**NOTE for iOS**: available on iOS 14.0+.
|
///**NOTE for iOS**: available on iOS 14.0+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - SFSafariViewControllerDelegate.safariViewControllerWillOpenInBrowser](https://developer.apple.com/documentation/safariservices/sfsafariviewcontrollerdelegate/3650426-safariviewcontrollerwillopeninbr))
|
///- iOS ([Official API - SFSafariViewControllerDelegate.safariViewControllerWillOpenInBrowser](https://developer.apple.com/documentation/safariservices/sfsafariviewcontrollerdelegate/3650426-safariviewcontrollerwillopeninbr))
|
||||||
|
///{@endtemplate}
|
||||||
void onWillOpenInBrowser() {}
|
void onWillOpenInBrowser() {}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformChromeSafariBrowser.onMessageChannelReady}
|
||||||
///Called when the [PlatformChromeSafariBrowser] has requested a postMessage channel through
|
///Called when the [PlatformChromeSafariBrowser] has requested a postMessage channel through
|
||||||
///[requestPostMessageChannel] and the channel is ready for sending and receiving messages on both ends.
|
///[PlatformChromeSafariBrowser.requestPostMessageChannel] and the channel is ready for sending and receiving messages on both ends.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android ([Official API - CustomTabsCallback.onMessageChannelReady](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsCallback#onMessageChannelReady(android.os.Bundle)))
|
///- Android ([Official API - CustomTabsCallback.onMessageChannelReady](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsCallback#onMessageChannelReady(android.os.Bundle)))
|
||||||
|
///{@endtemplate}
|
||||||
void onMessageChannelReady() {}
|
void onMessageChannelReady() {}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformChromeSafariBrowser.onPostMessage}
|
||||||
///Called when a tab controlled by this [PlatformChromeSafariBrowser] has sent a postMessage.
|
///Called when a tab controlled by this [PlatformChromeSafariBrowser] has sent a postMessage.
|
||||||
///If [postMessage] is called from a single thread, then the messages will be posted in the same order.
|
///If [PlatformChromeSafariBrowser.postMessage] is called from a single thread, then the messages will be posted in the same order.
|
||||||
///When received on the client side, it is the client's responsibility to preserve the ordering further.
|
///When received on the client side, it is the client's responsibility to preserve the ordering further.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android ([Official API - CustomTabsCallback.onPostMessage](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsCallback#onPostMessage(java.lang.String,android.os.Bundle)))
|
///- Android ([Official API - CustomTabsCallback.onPostMessage](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsCallback#onPostMessage(java.lang.String,android.os.Bundle)))
|
||||||
|
///{@endtemplate}
|
||||||
void onPostMessage(String message) {}
|
void onPostMessage(String message) {}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformChromeSafariBrowser.onVerticalScrollEvent}
|
||||||
///Called when a user scrolls the tab.
|
///Called when a user scrolls the tab.
|
||||||
///
|
///
|
||||||
///[isDirectionUp] - `false` when the user scrolls farther down the page,
|
///[isDirectionUp] - `false` when the user scrolls farther down the page,
|
||||||
///and `true` when the user scrolls back up toward the top of the page.
|
///and `true` when the user scrolls back up toward the top of the page.
|
||||||
///
|
///
|
||||||
///**NOTE**: available only if [isEngagementSignalsApiAvailable] returns `true`.
|
///**NOTE**: available only if [PlatformChromeSafariBrowser.isEngagementSignalsApiAvailable] returns `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android ([Official API - EngagementSignalsCallback.onVerticalScrollEvent](https://developer.android.com/reference/androidx/browser/customtabs/EngagementSignalsCallback#onVerticalScrollEvent(boolean,android.os.Bundle)))
|
///- Android ([Official API - EngagementSignalsCallback.onVerticalScrollEvent](https://developer.android.com/reference/androidx/browser/customtabs/EngagementSignalsCallback#onVerticalScrollEvent(boolean,android.os.Bundle)))
|
||||||
|
///{@endtemplate}
|
||||||
void onVerticalScrollEvent(bool isDirectionUp) {}
|
void onVerticalScrollEvent(bool isDirectionUp) {}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformChromeSafariBrowser.onGreatestScrollPercentageIncreased}
|
||||||
///Called when a user has reached a greater scroll percentage on the page. The greatest scroll
|
///Called when a user has reached a greater scroll percentage on the page. The greatest scroll
|
||||||
///percentage is reset if the user navigates to a different page. If the current page's total
|
///percentage is reset if the user navigates to a different page. If the current page's total
|
||||||
///height changes, this method will be called again only if the scroll progress reaches a
|
///height changes, this method will be called again only if the scroll progress reaches a
|
||||||
@ -511,27 +583,32 @@ abstract class PlatformChromeSafariBrowserEvents {
|
|||||||
///[scrollPercentage] - An integer indicating the percent of scrollable progress
|
///[scrollPercentage] - An integer indicating the percent of scrollable progress
|
||||||
///the user hasmade down the current page.
|
///the user hasmade down the current page.
|
||||||
///
|
///
|
||||||
///**NOTE**: available only if [isEngagementSignalsApiAvailable] returns `true`.
|
///**NOTE**: available only if [PlatformChromeSafariBrowser.isEngagementSignalsApiAvailable] returns `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android ([Official API - EngagementSignalsCallback.onGreatestScrollPercentageIncreased](https://developer.android.com/reference/androidx/browser/customtabs/EngagementSignalsCallback#onGreatestScrollPercentageIncreased(int,android.os.Bundle)))
|
///- Android ([Official API - EngagementSignalsCallback.onGreatestScrollPercentageIncreased](https://developer.android.com/reference/androidx/browser/customtabs/EngagementSignalsCallback#onGreatestScrollPercentageIncreased(int,android.os.Bundle)))
|
||||||
|
///{@endtemplate}
|
||||||
void onGreatestScrollPercentageIncreased(int scrollPercentage) {}
|
void onGreatestScrollPercentageIncreased(int scrollPercentage) {}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformChromeSafariBrowser.onSessionEnded}
|
||||||
///Called when a `CustomTabsSession` is ending or when no further Engagement Signals
|
///Called when a `CustomTabsSession` is ending or when no further Engagement Signals
|
||||||
///callbacks are expected to report whether any user action has occurred during the session.
|
///callbacks are expected to report whether any user action has occurred during the session.
|
||||||
///
|
///
|
||||||
///[didUserInteract] - Whether the user has interacted with the page in any way, e.g. scrolling.
|
///[didUserInteract] - Whether the user has interacted with the page in any way, e.g. scrolling.
|
||||||
///
|
///
|
||||||
///**NOTE**: available only if [isEngagementSignalsApiAvailable] returns `true`.
|
///**NOTE**: available only if [PlatformChromeSafariBrowser.isEngagementSignalsApiAvailable] returns `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android ([Official API - EngagementSignalsCallback.onSessionEnded](https://developer.android.com/reference/androidx/browser/customtabs/EngagementSignalsCallback#onSessionEnded(boolean,android.os.Bundle)))
|
///- Android ([Official API - EngagementSignalsCallback.onSessionEnded](https://developer.android.com/reference/androidx/browser/customtabs/EngagementSignalsCallback#onSessionEnded(boolean,android.os.Bundle)))
|
||||||
|
///{@endtemplate}
|
||||||
void onSessionEnded(bool didUserInteract) {}
|
void onSessionEnded(bool didUserInteract) {}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformChromeSafariBrowser.onClosed}
|
||||||
///Event fired when the [PlatformChromeSafariBrowser] is closed.
|
///Event fired when the [PlatformChromeSafariBrowser] is closed.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
///- iOS
|
///- iOS
|
||||||
|
///{@endtemplate}
|
||||||
void onClosed() {}
|
void onClosed() {}
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ class ContentBlockerTrigger {
|
|||||||
|
|
||||||
///A list of regular expressions to match iframes URL against.
|
///A list of regular expressions to match iframes URL against.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
List<String> ifFrameUrl;
|
List<String> ifFrameUrl;
|
||||||
@ -52,7 +52,7 @@ class ContentBlockerTrigger {
|
|||||||
///A Boolean value indicating if the URL matching should be case-sensitive.
|
///A Boolean value indicating if the URL matching should be case-sensitive.
|
||||||
///The default value is `false`.
|
///The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -62,7 +62,7 @@ class ContentBlockerTrigger {
|
|||||||
///(how the browser intends to use the resource) that the rule should match.
|
///(how the browser intends to use the resource) that the rule should match.
|
||||||
///If not specified, the rule matches all resource types.
|
///If not specified, the rule matches all resource types.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -72,7 +72,7 @@ class ContentBlockerTrigger {
|
|||||||
///Values must be lowercase ASCII, or punycode for non-ASCII.
|
///Values must be lowercase ASCII, or punycode for non-ASCII.
|
||||||
///Add * in front to match domain and subdomains. Can't be used with [ContentBlockerTrigger.unlessDomain].
|
///Add * in front to match domain and subdomains. Can't be used with [ContentBlockerTrigger.unlessDomain].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -82,7 +82,7 @@ class ContentBlockerTrigger {
|
|||||||
///Values must be lowercase ASCII, or punycode for non-ASCII.
|
///Values must be lowercase ASCII, or punycode for non-ASCII.
|
||||||
///Add * in front to match domain and subdomains. Can't be used with [ContentBlockerTrigger.ifDomain].
|
///Add * in front to match domain and subdomains. Can't be used with [ContentBlockerTrigger.ifDomain].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -91,7 +91,7 @@ class ContentBlockerTrigger {
|
|||||||
///A list of [ContentBlockerTriggerLoadType] that can include one of two mutually exclusive values.
|
///A list of [ContentBlockerTriggerLoadType] that can include one of two mutually exclusive values.
|
||||||
///If not specified, the rule matches all load types.
|
///If not specified, the rule matches all load types.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -100,7 +100,7 @@ class ContentBlockerTrigger {
|
|||||||
///A list of strings matched to the entire main document URL; limits the action to a specific list of URL patterns.
|
///A list of strings matched to the entire main document URL; limits the action to a specific list of URL patterns.
|
||||||
///Values must be lowercase ASCII, or punycode for non-ASCII. Can't be used with [ContentBlockerTrigger.unlessTopUrl].
|
///Values must be lowercase ASCII, or punycode for non-ASCII. Can't be used with [ContentBlockerTrigger.unlessTopUrl].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -109,7 +109,7 @@ class ContentBlockerTrigger {
|
|||||||
///An array of strings matched to the entire main document URL; acts on any site except URL patterns in provided list.
|
///An array of strings matched to the entire main document URL; acts on any site except URL patterns in provided list.
|
||||||
///Values must be lowercase ASCII, or punycode for non-ASCII. Can't be used with [ContentBlockerTrigger.ifTopUrl].
|
///Values must be lowercase ASCII, or punycode for non-ASCII. Can't be used with [ContentBlockerTrigger.ifTopUrl].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -117,7 +117,7 @@ class ContentBlockerTrigger {
|
|||||||
|
|
||||||
///An array of strings that specify loading contexts.
|
///An array of strings that specify loading contexts.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
List<ContentBlockerTriggerLoadContext> loadContext;
|
List<ContentBlockerTriggerLoadContext> loadContext;
|
||||||
|
@ -10,7 +10,7 @@ part of 'context_menu.dart';
|
|||||||
///
|
///
|
||||||
///**NOTE for Android native WebView**: To make it work properly on Android, JavaScript should be enabled!
|
///**NOTE for Android native WebView**: To make it work properly on Android, JavaScript should be enabled!
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
class ContextMenu {
|
class ContextMenu {
|
||||||
@ -40,7 +40,7 @@ class ContextMenu {
|
|||||||
///
|
///
|
||||||
///**NOTE for Android native WebView**: To make it work properly on Android, JavaScript should be enabled!
|
///**NOTE for Android native WebView**: To make it work properly on Android, JavaScript should be enabled!
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
ContextMenu(
|
ContextMenu(
|
||||||
|
@ -24,10 +24,15 @@ class PlatformFindInteractionControllerCreationParams {
|
|||||||
bool isDoneCounting)? onFindResultReceived;
|
bool isDoneCounting)? onFindResultReceived;
|
||||||
}
|
}
|
||||||
|
|
||||||
///**Supported Platforms/Implementations**:
|
///{@template flutter_inappwebview_platform_interface.PlatformFindInteractionController}
|
||||||
|
///This class represents the controller used by the `WebView` to add
|
||||||
|
///text-finding capabilities, such as the "Find on page" feature.
|
||||||
|
///
|
||||||
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
|
///{@endtemplate}
|
||||||
abstract class PlatformFindInteractionController extends PlatformInterface
|
abstract class PlatformFindInteractionController extends PlatformInterface
|
||||||
implements Disposable {
|
implements Disposable {
|
||||||
///Debug settings.
|
///Debug settings.
|
||||||
@ -75,7 +80,7 @@ abstract class PlatformFindInteractionController extends PlatformInterface
|
|||||||
///
|
///
|
||||||
///**NOTE**: on iOS, if [InAppWebViewSettings.isFindInteractionEnabled] is `true`, this event will not be called.
|
///**NOTE**: on iOS, if [InAppWebViewSettings.isFindInteractionEnabled] is `true`, this event will not be called.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebView.FindListener.onFindResultReceived](https://developer.android.com/reference/android/webkit/WebView.FindListener#onFindResultReceived(int,%20int,%20boolean)))
|
///- Android native WebView ([Official API - WebView.FindListener.onFindResultReceived](https://developer.android.com/reference/android/webkit/WebView.FindListener#onFindResultReceived(int,%20int,%20boolean)))
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -84,6 +89,7 @@ abstract class PlatformFindInteractionController extends PlatformInterface
|
|||||||
int activeMatchOrdinal, int numberOfMatches, bool isDoneCounting)?
|
int activeMatchOrdinal, int numberOfMatches, bool isDoneCounting)?
|
||||||
get onFindResultReceived => params.onFindResultReceived;
|
get onFindResultReceived => params.onFindResultReceived;
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformFindInteractionController.findAll}
|
||||||
///Finds all instances of find on the page and highlights them. Notifies [PlatformFindInteractionController.onFindResultReceived] listener.
|
///Finds all instances of find on the page and highlights them. Notifies [PlatformFindInteractionController.onFindResultReceived] listener.
|
||||||
///
|
///
|
||||||
///[find] represents the string to find.
|
///[find] represents the string to find.
|
||||||
@ -94,15 +100,17 @@ abstract class PlatformFindInteractionController extends PlatformInterface
|
|||||||
///it uses the built-in find interaction native UI,
|
///it uses the built-in find interaction native UI,
|
||||||
///otherwise this is implemented using CSS and Javascript.
|
///otherwise this is implemented using CSS and Javascript.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebView.findAllAsync](https://developer.android.com/reference/android/webkit/WebView#findAllAsync(java.lang.String)))
|
///- Android native WebView ([Official API - WebView.findAllAsync](https://developer.android.com/reference/android/webkit/WebView#findAllAsync(java.lang.String)))
|
||||||
///- iOS (if [InAppWebViewSettings.isFindInteractionEnabled] is `true`: [Official API - UIFindInteraction.presentFindNavigator](https://developer.apple.com/documentation/uikit/uifindinteraction/3975832-presentfindnavigator?changes=_2) with [Official API - UIFindInteraction.searchText](https://developer.apple.com/documentation/uikit/uifindinteraction/3975834-searchtext?changes=_2))
|
///- iOS (if [InAppWebViewSettings.isFindInteractionEnabled] is `true`: [Official API - UIFindInteraction.presentFindNavigator](https://developer.apple.com/documentation/uikit/uifindinteraction/3975832-presentfindnavigator?changes=_2) with [Official API - UIFindInteraction.searchText](https://developer.apple.com/documentation/uikit/uifindinteraction/3975834-searchtext?changes=_2))
|
||||||
///- MacOS
|
///- MacOS
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> findAll({String? find}) {
|
Future<void> findAll({String? find}) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'findAll is not implemented on the current platform');
|
'findAll is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformFindInteractionController.findNext}
|
||||||
///Highlights and scrolls to the next match found by [findAll]. Notifies [PlatformFindInteractionController.onFindResultReceived] listener.
|
///Highlights and scrolls to the next match found by [findAll]. Notifies [PlatformFindInteractionController.onFindResultReceived] listener.
|
||||||
///
|
///
|
||||||
///[forward] represents the direction to search. The default value is `true`, meaning forward.
|
///[forward] represents the direction to search. The default value is `true`, meaning forward.
|
||||||
@ -111,113 +119,133 @@ abstract class PlatformFindInteractionController extends PlatformInterface
|
|||||||
///it uses the built-in find interaction native UI,
|
///it uses the built-in find interaction native UI,
|
||||||
///otherwise this is implemented using CSS and Javascript.
|
///otherwise this is implemented using CSS and Javascript.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebView.findNext](https://developer.android.com/reference/android/webkit/WebView#findNext(boolean)))
|
///- Android native WebView ([Official API - WebView.findNext](https://developer.android.com/reference/android/webkit/WebView#findNext(boolean)))
|
||||||
///- iOS (if [InAppWebViewSettings.isFindInteractionEnabled] is `true`: [Official API - UIFindInteraction.findNext](https://developer.apple.com/documentation/uikit/uifindinteraction/3975829-findnext?changes=_2) and ([Official API - UIFindInteraction.findPrevious](https://developer.apple.com/documentation/uikit/uifindinteraction/3975830-findprevious?changes=_2)))
|
///- iOS (if [InAppWebViewSettings.isFindInteractionEnabled] is `true`: [Official API - UIFindInteraction.findNext](https://developer.apple.com/documentation/uikit/uifindinteraction/3975829-findnext?changes=_2) and ([Official API - UIFindInteraction.findPrevious](https://developer.apple.com/documentation/uikit/uifindinteraction/3975830-findprevious?changes=_2)))
|
||||||
///- MacOS
|
///- MacOS
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> findNext({bool forward = true}) {
|
Future<void> findNext({bool forward = true}) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'findNext is not implemented on the current platform');
|
'findNext is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformFindInteractionController.clearMatches}
|
||||||
///Clears the highlighting surrounding text matches created by [findAll].
|
///Clears the highlighting surrounding text matches created by [findAll].
|
||||||
///
|
///
|
||||||
///**NOTE**: on iOS, if [InAppWebViewSettings.isFindInteractionEnabled] is `true`,
|
///**NOTE**: on iOS, if [InAppWebViewSettings.isFindInteractionEnabled] is `true`,
|
||||||
///it uses the built-in find interaction native UI,
|
///it uses the built-in find interaction native UI,
|
||||||
///otherwise this is implemented using CSS and Javascript.
|
///otherwise this is implemented using CSS and Javascript.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebView.clearMatches](https://developer.android.com/reference/android/webkit/WebView#clearMatches()))
|
///- Android native WebView ([Official API - WebView.clearMatches](https://developer.android.com/reference/android/webkit/WebView#clearMatches()))
|
||||||
///- iOS (if [InAppWebViewSettings.isFindInteractionEnabled] is `true`: [Official API - UIFindInteraction.dismissFindNavigator](https://developer.apple.com/documentation/uikit/uifindinteraction/3975827-dismissfindnavigator?changes=_2))
|
///- iOS (if [InAppWebViewSettings.isFindInteractionEnabled] is `true`: [Official API - UIFindInteraction.dismissFindNavigator](https://developer.apple.com/documentation/uikit/uifindinteraction/3975827-dismissfindnavigator?changes=_2))
|
||||||
///- MacOS
|
///- MacOS
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> clearMatches() {
|
Future<void> clearMatches() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'clearMatches is not implemented on the current platform');
|
'clearMatches is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformFindInteractionController.setSearchText}
|
||||||
///Pre-populate the search text to be used.
|
///Pre-populate the search text to be used.
|
||||||
///
|
///
|
||||||
///On iOS, if [InAppWebViewSettings.isFindInteractionEnabled] is `true,
|
///On iOS, if [InAppWebViewSettings.isFindInteractionEnabled] is `true,
|
||||||
///it will pre-populate the system find panel's search text field with a search query.
|
///it will pre-populate the system find panel's search text field with a search query.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS ([Official API - UIFindInteraction.searchText](https://developer.apple.com/documentation/uikit/uifindinteraction/3975834-searchtext?changes=_2))
|
///- iOS ([Official API - UIFindInteraction.searchText](https://developer.apple.com/documentation/uikit/uifindinteraction/3975834-searchtext?changes=_2))
|
||||||
///- MacOS
|
///- MacOS
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> setSearchText(String? searchText) {
|
Future<void> setSearchText(String? searchText) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'setSearchText is not implemented on the current platform');
|
'setSearchText is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformFindInteractionController.getSearchText}
|
||||||
///Get the search text used.
|
///Get the search text used.
|
||||||
///
|
///
|
||||||
///On iOS, if [InAppWebViewSettings.isFindInteractionEnabled] is `true,
|
///On iOS, if [InAppWebViewSettings.isFindInteractionEnabled] is `true,
|
||||||
///it will get the system find panel's search text field value.
|
///it will get the system find panel's search text field value.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS ([Official API - UIFindInteraction.searchText](https://developer.apple.com/documentation/uikit/uifindinteraction/3975834-searchtext?changes=_2))
|
///- iOS ([Official API - UIFindInteraction.searchText](https://developer.apple.com/documentation/uikit/uifindinteraction/3975834-searchtext?changes=_2))
|
||||||
///- MacOS
|
///- MacOS
|
||||||
|
///{@endtemplate}
|
||||||
Future<String?> getSearchText() {
|
Future<String?> getSearchText() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'getSearchText is not implemented on the current platform');
|
'getSearchText is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformFindInteractionController.isFindNavigatorVisible}
|
||||||
///A Boolean value that indicates when the find panel displays onscreen.
|
///A Boolean value that indicates when the find panel displays onscreen.
|
||||||
///
|
///
|
||||||
///**NOTE**: available only on iOS and only if [InAppWebViewSettings.isFindInteractionEnabled] is `true`.
|
///**NOTE**: available only on iOS and only if [InAppWebViewSettings.isFindInteractionEnabled] is `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - UIFindInteraction.isFindNavigatorVisible](https://developer.apple.com/documentation/uikit/uifindinteraction/3975828-isfindnavigatorvisible?changes=_2))
|
///- iOS ([Official API - UIFindInteraction.isFindNavigatorVisible](https://developer.apple.com/documentation/uikit/uifindinteraction/3975828-isfindnavigatorvisible?changes=_2))
|
||||||
|
///{@endtemplate}
|
||||||
Future<bool?> isFindNavigatorVisible() {
|
Future<bool?> isFindNavigatorVisible() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'isFindNavigatorVisible is not implemented on the current platform');
|
'isFindNavigatorVisible is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformFindInteractionController.updateResultCount}
|
||||||
///Updates the results the interface displays for the active search.
|
///Updates the results the interface displays for the active search.
|
||||||
///
|
///
|
||||||
///**NOTE**: available only on iOS and only if [InAppWebViewSettings.isFindInteractionEnabled] is `true`.
|
///**NOTE**: available only on iOS and only if [InAppWebViewSettings.isFindInteractionEnabled] is `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - UIFindInteraction.updateResultCount](https://developer.apple.com/documentation/uikit/uifindinteraction/3975835-updateresultcount?changes=_2))
|
///- iOS ([Official API - UIFindInteraction.updateResultCount](https://developer.apple.com/documentation/uikit/uifindinteraction/3975835-updateresultcount?changes=_2))
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> updateResultCount() {
|
Future<void> updateResultCount() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'updateResultCount is not implemented on the current platform');
|
'updateResultCount is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformFindInteractionController.presentFindNavigator}
|
||||||
///Begins a search, displaying the find panel.
|
///Begins a search, displaying the find panel.
|
||||||
///
|
///
|
||||||
///**NOTE**: available only on iOS and only if [InAppWebViewSettings.isFindInteractionEnabled] is `true`.
|
///**NOTE**: available only on iOS and only if [InAppWebViewSettings.isFindInteractionEnabled] is `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - UIFindInteraction.presentFindNavigator](https://developer.apple.com/documentation/uikit/uifindinteraction/3975832-presentfindnavigator?changes=_2))
|
///- iOS ([Official API - UIFindInteraction.presentFindNavigator](https://developer.apple.com/documentation/uikit/uifindinteraction/3975832-presentfindnavigator?changes=_2))
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> presentFindNavigator() {
|
Future<void> presentFindNavigator() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'presentFindNavigator is not implemented on the current platform');
|
'presentFindNavigator is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformFindInteractionController.dismissFindNavigator}
|
||||||
///Dismisses the find panel, if present.
|
///Dismisses the find panel, if present.
|
||||||
///
|
///
|
||||||
///**NOTE**: available only on iOS and only if [InAppWebViewSettings.isFindInteractionEnabled] is `true`.
|
///**NOTE**: available only on iOS and only if [InAppWebViewSettings.isFindInteractionEnabled] is `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - UIFindInteraction.dismissFindNavigator](https://developer.apple.com/documentation/uikit/uifindinteraction/3975827-dismissfindnavigator?changes=_2))
|
///- iOS ([Official API - UIFindInteraction.dismissFindNavigator](https://developer.apple.com/documentation/uikit/uifindinteraction/3975827-dismissfindnavigator?changes=_2))
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> dismissFindNavigator() {
|
Future<void> dismissFindNavigator() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'dismissFindNavigator is not implemented on the current platform');
|
'dismissFindNavigator is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformFindInteractionController.getActiveFindSession}
|
||||||
///If there's a currently active find session, returns the active find session.
|
///If there's a currently active find session, returns the active find session.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS ([Official API - UIFindInteraction.activeFindSession](https://developer.apple.com/documentation/uikit/uifindinteraction/3975825-activefindsession?changes=_7____4_8&language=objc))
|
///- iOS ([Official API - UIFindInteraction.activeFindSession](https://developer.apple.com/documentation/uikit/uifindinteraction/3975825-activefindsession?changes=_7____4_8&language=objc))
|
||||||
///- MacOS
|
///- MacOS
|
||||||
|
///{@endtemplate}
|
||||||
Future<FindSession?> getActiveFindSession() {
|
Future<FindSession?> getActiveFindSession() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'getActiveFindSession is not implemented on the current platform');
|
'getActiveFindSession is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformFindInteractionController.dispose}
|
||||||
|
///Disposes the controller.
|
||||||
|
///{@endtemplate}
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
|
@ -8,7 +8,7 @@ part of 'in_app_browser_menu_item.dart';
|
|||||||
|
|
||||||
///Class that represents a custom menu item for a [PlatformInAppBrowser] instance.
|
///Class that represents a custom menu item for a [PlatformInAppBrowser] instance.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -18,7 +18,7 @@ class InAppBrowserMenuItem {
|
|||||||
|
|
||||||
///Icon color.
|
///Icon color.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS 13.0+
|
///- iOS 13.0+
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -40,7 +40,7 @@ class InAppBrowserMenuItem {
|
|||||||
String title;
|
String title;
|
||||||
|
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
|
@ -100,7 +100,7 @@ class InAppBrowserSettings_
|
|||||||
///Set to `true` to create the browser and load the page, but not show it. Omit or set to `false` to have the browser open and load normally.
|
///Set to `true` to create the browser and load the page, but not show it. Omit or set to `false` to have the browser open and load normally.
|
||||||
///The default value is `false`.
|
///The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -108,7 +108,7 @@ class InAppBrowserSettings_
|
|||||||
|
|
||||||
///Set to `true` to hide the toolbar at the top of the WebView. The default value is `false`.
|
///Set to `true` to hide the toolbar at the top of the WebView. The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -116,7 +116,7 @@ class InAppBrowserSettings_
|
|||||||
|
|
||||||
///Set the custom background color of the toolbar at the top.
|
///Set the custom background color of the toolbar at the top.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -124,7 +124,7 @@ class InAppBrowserSettings_
|
|||||||
|
|
||||||
///Set to `true` to hide the url bar on the toolbar at the top. The default value is `false`.
|
///Set to `true` to hide the url bar on the toolbar at the top. The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -132,7 +132,7 @@ class InAppBrowserSettings_
|
|||||||
|
|
||||||
///Set to `true` to hide the progress bar when the WebView is loading a page. The default value is `false`.
|
///Set to `true` to hide the progress bar when the WebView is loading a page. The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -140,137 +140,137 @@ class InAppBrowserSettings_
|
|||||||
|
|
||||||
///Set to `true` to hide the default menu items. The default value is `false`.
|
///Set to `true` to hide the default menu items. The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
bool? hideDefaultMenuItems;
|
bool? hideDefaultMenuItems;
|
||||||
|
|
||||||
///Set to `true` if you want the title should be displayed. The default value is `false`.
|
///Set to `true` if you want the title should be displayed. The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
bool? hideTitleBar;
|
bool? hideTitleBar;
|
||||||
|
|
||||||
///Set the action bar's title.
|
///Set the action bar's title.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- MacOS
|
///- MacOS
|
||||||
String? toolbarTopFixedTitle;
|
String? toolbarTopFixedTitle;
|
||||||
|
|
||||||
///Set to `false` to not close the InAppBrowser when the user click on the Android back button and the WebView cannot go back to the history. The default value is `true`.
|
///Set to `false` to not close the InAppBrowser when the user click on the Android back button and the WebView cannot go back to the history. The default value is `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
bool? closeOnCannotGoBack;
|
bool? closeOnCannotGoBack;
|
||||||
|
|
||||||
///Set to `false` to block the InAppBrowser WebView going back when the user click on the Android back button. The default value is `true`.
|
///Set to `false` to block the InAppBrowser WebView going back when the user click on the Android back button. The default value is `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
bool? allowGoBackWithBackButton;
|
bool? allowGoBackWithBackButton;
|
||||||
|
|
||||||
///Set to `true` to close the InAppBrowser when the user click on the Android back button. The default value is `false`.
|
///Set to `true` to close the InAppBrowser when the user click on the Android back button. The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
bool? shouldCloseOnBackButtonPressed;
|
bool? shouldCloseOnBackButtonPressed;
|
||||||
|
|
||||||
///Set to `true` to set the toolbar at the top translucent. The default value is `true`.
|
///Set to `true` to set the toolbar at the top translucent. The default value is `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
bool? toolbarTopTranslucent;
|
bool? toolbarTopTranslucent;
|
||||||
|
|
||||||
///Set the tint color to apply to the navigation bar background.
|
///Set the tint color to apply to the navigation bar background.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
Color_? toolbarTopBarTintColor;
|
Color_? toolbarTopBarTintColor;
|
||||||
|
|
||||||
///Set the tint color to apply to the navigation items and bar button items.
|
///Set the tint color to apply to the navigation items and bar button items.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
Color_? toolbarTopTintColor;
|
Color_? toolbarTopTintColor;
|
||||||
|
|
||||||
///Set to `true` to hide the toolbar at the bottom of the WebView. The default value is `false`.
|
///Set to `true` to hide the toolbar at the bottom of the WebView. The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
bool? hideToolbarBottom;
|
bool? hideToolbarBottom;
|
||||||
|
|
||||||
///Set the custom background color of the toolbar at the bottom.
|
///Set the custom background color of the toolbar at the bottom.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
Color_? toolbarBottomBackgroundColor;
|
Color_? toolbarBottomBackgroundColor;
|
||||||
|
|
||||||
///Set the tint color to apply to the bar button items.
|
///Set the tint color to apply to the bar button items.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
Color_? toolbarBottomTintColor;
|
Color_? toolbarBottomTintColor;
|
||||||
|
|
||||||
///Set to `true` to set the toolbar at the bottom translucent. The default value is `true`.
|
///Set to `true` to set the toolbar at the bottom translucent. The default value is `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
bool? toolbarBottomTranslucent;
|
bool? toolbarBottomTranslucent;
|
||||||
|
|
||||||
///Set the custom text for the close button.
|
///Set the custom text for the close button.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
String? closeButtonCaption;
|
String? closeButtonCaption;
|
||||||
|
|
||||||
///Set the custom color for the close button.
|
///Set the custom color for the close button.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
Color_? closeButtonColor;
|
Color_? closeButtonColor;
|
||||||
|
|
||||||
///Set to `true` to hide the close button. The default value is `false`.
|
///Set to `true` to hide the close button. The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
bool? hideCloseButton;
|
bool? hideCloseButton;
|
||||||
|
|
||||||
///Set the custom color for the menu button.
|
///Set the custom color for the menu button.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
Color_? menuButtonColor;
|
Color_? menuButtonColor;
|
||||||
|
|
||||||
///Set the custom modal presentation style when presenting the WebView. The default value is [ModalPresentationStyle.FULL_SCREEN].
|
///Set the custom modal presentation style when presenting the WebView. The default value is [ModalPresentationStyle.FULL_SCREEN].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
ModalPresentationStyle_? presentationStyle;
|
ModalPresentationStyle_? presentationStyle;
|
||||||
|
|
||||||
///Set to the custom transition style when presenting the WebView. The default value is [ModalTransitionStyle.COVER_VERTICAL].
|
///Set to the custom transition style when presenting the WebView. The default value is [ModalTransitionStyle.COVER_VERTICAL].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
ModalTransitionStyle_? transitionStyle;
|
ModalTransitionStyle_? transitionStyle;
|
||||||
|
|
||||||
///How the browser window should be added to the main window.
|
///How the browser window should be added to the main window.
|
||||||
///The default value is [WindowType.CHILD].
|
///The default value is [WindowType.CHILD].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
WindowType_? windowType;
|
WindowType_? windowType;
|
||||||
|
|
||||||
///The window’s alpha value.
|
///The window’s alpha value.
|
||||||
///The default value is `1.0`.
|
///The default value is `1.0`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
double? windowAlphaValue;
|
double? windowAlphaValue;
|
||||||
|
|
||||||
///Flags that describe the window’s current style, such as if it’s resizable or in full-screen mode.
|
///Flags that describe the window’s current style, such as if it’s resizable or in full-screen mode.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
WindowStyleMask_? windowStyleMask;
|
WindowStyleMask_? windowStyleMask;
|
||||||
|
|
||||||
@ -278,14 +278,14 @@ class InAppBrowserSettings_
|
|||||||
///
|
///
|
||||||
///**NOTE for MacOS**: available on MacOS 11.0+.
|
///**NOTE for MacOS**: available on MacOS 11.0+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
WindowTitlebarSeparatorStyle_? windowTitlebarSeparatorStyle;
|
WindowTitlebarSeparatorStyle_? windowTitlebarSeparatorStyle;
|
||||||
|
|
||||||
///Sets the origin and size of the window’s frame rectangle according to a given frame rectangle,
|
///Sets the origin and size of the window’s frame rectangle according to a given frame rectangle,
|
||||||
///thereby setting its position and size onscreen.
|
///thereby setting its position and size onscreen.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
InAppWebViewRect_? windowFrame;
|
InAppWebViewRect_? windowFrame;
|
||||||
|
|
||||||
|
@ -11,32 +11,32 @@ class InAppBrowserSettings
|
|||||||
implements BrowserOptions, AndroidOptions, IosOptions {
|
implements BrowserOptions, AndroidOptions, IosOptions {
|
||||||
///Set to `false` to block the InAppBrowser WebView going back when the user click on the Android back button. The default value is `true`.
|
///Set to `false` to block the InAppBrowser WebView going back when the user click on the Android back button. The default value is `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
bool? allowGoBackWithBackButton;
|
bool? allowGoBackWithBackButton;
|
||||||
|
|
||||||
///Set the custom text for the close button.
|
///Set the custom text for the close button.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
String? closeButtonCaption;
|
String? closeButtonCaption;
|
||||||
|
|
||||||
///Set the custom color for the close button.
|
///Set the custom color for the close button.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
Color? closeButtonColor;
|
Color? closeButtonColor;
|
||||||
|
|
||||||
///Set to `false` to not close the InAppBrowser when the user click on the Android back button and the WebView cannot go back to the history. The default value is `true`.
|
///Set to `false` to not close the InAppBrowser when the user click on the Android back button and the WebView cannot go back to the history. The default value is `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
bool? closeOnCannotGoBack;
|
bool? closeOnCannotGoBack;
|
||||||
|
|
||||||
///Set to `true` to create the browser and load the page, but not show it. Omit or set to `false` to have the browser open and load normally.
|
///Set to `true` to create the browser and load the page, but not show it. Omit or set to `false` to have the browser open and load normally.
|
||||||
///The default value is `false`.
|
///The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -44,20 +44,20 @@ class InAppBrowserSettings
|
|||||||
|
|
||||||
///Set to `true` to hide the close button. The default value is `false`.
|
///Set to `true` to hide the close button. The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
bool? hideCloseButton;
|
bool? hideCloseButton;
|
||||||
|
|
||||||
///Set to `true` to hide the default menu items. The default value is `false`.
|
///Set to `true` to hide the default menu items. The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
bool? hideDefaultMenuItems;
|
bool? hideDefaultMenuItems;
|
||||||
|
|
||||||
///Set to `true` to hide the progress bar when the WebView is loading a page. The default value is `false`.
|
///Set to `true` to hide the progress bar when the WebView is loading a page. The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -65,19 +65,19 @@ class InAppBrowserSettings
|
|||||||
|
|
||||||
///Set to `true` if you want the title should be displayed. The default value is `false`.
|
///Set to `true` if you want the title should be displayed. The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
bool? hideTitleBar;
|
bool? hideTitleBar;
|
||||||
|
|
||||||
///Set to `true` to hide the toolbar at the bottom of the WebView. The default value is `false`.
|
///Set to `true` to hide the toolbar at the bottom of the WebView. The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
bool? hideToolbarBottom;
|
bool? hideToolbarBottom;
|
||||||
|
|
||||||
///Set to `true` to hide the toolbar at the top of the WebView. The default value is `false`.
|
///Set to `true` to hide the toolbar at the top of the WebView. The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -85,7 +85,7 @@ class InAppBrowserSettings
|
|||||||
|
|
||||||
///Set to `true` to hide the url bar on the toolbar at the top. The default value is `false`.
|
///Set to `true` to hide the url bar on the toolbar at the top. The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -93,43 +93,43 @@ class InAppBrowserSettings
|
|||||||
|
|
||||||
///Set the custom color for the menu button.
|
///Set the custom color for the menu button.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
Color? menuButtonColor;
|
Color? menuButtonColor;
|
||||||
|
|
||||||
///Set the custom modal presentation style when presenting the WebView. The default value is [ModalPresentationStyle.FULL_SCREEN].
|
///Set the custom modal presentation style when presenting the WebView. The default value is [ModalPresentationStyle.FULL_SCREEN].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
ModalPresentationStyle? presentationStyle;
|
ModalPresentationStyle? presentationStyle;
|
||||||
|
|
||||||
///Set to `true` to close the InAppBrowser when the user click on the Android back button. The default value is `false`.
|
///Set to `true` to close the InAppBrowser when the user click on the Android back button. The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
bool? shouldCloseOnBackButtonPressed;
|
bool? shouldCloseOnBackButtonPressed;
|
||||||
|
|
||||||
///Set the custom background color of the toolbar at the bottom.
|
///Set the custom background color of the toolbar at the bottom.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
Color? toolbarBottomBackgroundColor;
|
Color? toolbarBottomBackgroundColor;
|
||||||
|
|
||||||
///Set the tint color to apply to the bar button items.
|
///Set the tint color to apply to the bar button items.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
Color? toolbarBottomTintColor;
|
Color? toolbarBottomTintColor;
|
||||||
|
|
||||||
///Set to `true` to set the toolbar at the bottom translucent. The default value is `true`.
|
///Set to `true` to set the toolbar at the bottom translucent. The default value is `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
bool? toolbarBottomTranslucent;
|
bool? toolbarBottomTranslucent;
|
||||||
|
|
||||||
///Set the custom background color of the toolbar at the top.
|
///Set the custom background color of the toolbar at the top.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -137,52 +137,52 @@ class InAppBrowserSettings
|
|||||||
|
|
||||||
///Set the tint color to apply to the navigation bar background.
|
///Set the tint color to apply to the navigation bar background.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
Color? toolbarTopBarTintColor;
|
Color? toolbarTopBarTintColor;
|
||||||
|
|
||||||
///Set the action bar's title.
|
///Set the action bar's title.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- MacOS
|
///- MacOS
|
||||||
String? toolbarTopFixedTitle;
|
String? toolbarTopFixedTitle;
|
||||||
|
|
||||||
///Set the tint color to apply to the navigation items and bar button items.
|
///Set the tint color to apply to the navigation items and bar button items.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
Color? toolbarTopTintColor;
|
Color? toolbarTopTintColor;
|
||||||
|
|
||||||
///Set to `true` to set the toolbar at the top translucent. The default value is `true`.
|
///Set to `true` to set the toolbar at the top translucent. The default value is `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
bool? toolbarTopTranslucent;
|
bool? toolbarTopTranslucent;
|
||||||
|
|
||||||
///Set to the custom transition style when presenting the WebView. The default value is [ModalTransitionStyle.COVER_VERTICAL].
|
///Set to the custom transition style when presenting the WebView. The default value is [ModalTransitionStyle.COVER_VERTICAL].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
ModalTransitionStyle? transitionStyle;
|
ModalTransitionStyle? transitionStyle;
|
||||||
|
|
||||||
///The window’s alpha value.
|
///The window’s alpha value.
|
||||||
///The default value is `1.0`.
|
///The default value is `1.0`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
double? windowAlphaValue;
|
double? windowAlphaValue;
|
||||||
|
|
||||||
///Sets the origin and size of the window’s frame rectangle according to a given frame rectangle,
|
///Sets the origin and size of the window’s frame rectangle according to a given frame rectangle,
|
||||||
///thereby setting its position and size onscreen.
|
///thereby setting its position and size onscreen.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
InAppWebViewRect? windowFrame;
|
InAppWebViewRect? windowFrame;
|
||||||
|
|
||||||
///Flags that describe the window’s current style, such as if it’s resizable or in full-screen mode.
|
///Flags that describe the window’s current style, such as if it’s resizable or in full-screen mode.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
WindowStyleMask? windowStyleMask;
|
WindowStyleMask? windowStyleMask;
|
||||||
|
|
||||||
@ -190,14 +190,14 @@ class InAppBrowserSettings
|
|||||||
///
|
///
|
||||||
///**NOTE for MacOS**: available on MacOS 11.0+.
|
///**NOTE for MacOS**: available on MacOS 11.0+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
WindowTitlebarSeparatorStyle? windowTitlebarSeparatorStyle;
|
WindowTitlebarSeparatorStyle? windowTitlebarSeparatorStyle;
|
||||||
|
|
||||||
///How the browser window should be added to the main window.
|
///How the browser window should be added to the main window.
|
||||||
///The default value is [WindowType.CHILD].
|
///The default value is [WindowType.CHILD].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
WindowType? windowType;
|
WindowType? windowType;
|
||||||
InAppBrowserSettings(
|
InAppBrowserSettings(
|
||||||
|
@ -54,13 +54,17 @@ class PlatformInAppBrowserCreationParams {
|
|||||||
final int? windowId;
|
final int? windowId;
|
||||||
}
|
}
|
||||||
|
|
||||||
///This class uses the native WebView of the platform.
|
///{@template flutter_inappwebview_platform_interface.PlatformInAppBrowser}
|
||||||
|
///This class represents a native WebView displayed on top of the Flutter App,
|
||||||
|
///so it's not integrated into the Flutter widget tree.
|
||||||
|
///It uses the native WebView of the platform.
|
||||||
///The [webViewController] field can be used to access the [PlatformInAppWebViewController] API.
|
///The [webViewController] field can be used to access the [PlatformInAppWebViewController] API.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
|
///@{endtemplate}
|
||||||
abstract class PlatformInAppBrowser extends PlatformInterface
|
abstract class PlatformInAppBrowser extends PlatformInterface
|
||||||
implements Disposable {
|
implements Disposable {
|
||||||
///Debug settings.
|
///Debug settings.
|
||||||
@ -72,7 +76,9 @@ abstract class PlatformInAppBrowser extends PlatformInterface
|
|||||||
///{@template flutter_inappwebview_platform_interface.PlatformInAppBrowser.id}
|
///{@template flutter_inappwebview_platform_interface.PlatformInAppBrowser.id}
|
||||||
///View ID used internally.
|
///View ID used internally.
|
||||||
///@{endtemplate}
|
///@{endtemplate}
|
||||||
String get id;
|
String get id {
|
||||||
|
throw UnimplementedError('id is not implemented on the current platform');
|
||||||
|
}
|
||||||
|
|
||||||
///{@template flutter_inappwebview_platform_interface.PlatformInAppBrowser.contextMenu}
|
///{@template flutter_inappwebview_platform_interface.PlatformInAppBrowser.contextMenu}
|
||||||
///Context menu used by the browser. It should be set before opening the browser.
|
///Context menu used by the browser. It should be set before opening the browser.
|
||||||
@ -153,6 +159,7 @@ abstract class PlatformInAppBrowser extends PlatformInterface
|
|||||||
/// The parameters used to initialize the [PlatformInAppBrowser].
|
/// The parameters used to initialize the [PlatformInAppBrowser].
|
||||||
final PlatformInAppBrowserCreationParams params;
|
final PlatformInAppBrowserCreationParams params;
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformInAppBrowser.openUrlRequest}
|
||||||
///Opens the [PlatformInAppBrowser] instance with an [urlRequest].
|
///Opens the [PlatformInAppBrowser] instance with an [urlRequest].
|
||||||
///
|
///
|
||||||
///[urlRequest]: The [urlRequest] to load.
|
///[urlRequest]: The [urlRequest] to load.
|
||||||
@ -161,10 +168,11 @@ abstract class PlatformInAppBrowser extends PlatformInterface
|
|||||||
///
|
///
|
||||||
///[settings]: Settings for the [PlatformInAppBrowser].
|
///[settings]: Settings for the [PlatformInAppBrowser].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> openUrlRequest(
|
Future<void> openUrlRequest(
|
||||||
{required URLRequest urlRequest,
|
{required URLRequest urlRequest,
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
@ -174,6 +182,7 @@ abstract class PlatformInAppBrowser extends PlatformInterface
|
|||||||
'openUrlRequest is not implemented on the current platform');
|
'openUrlRequest is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformInAppBrowser.openFile}
|
||||||
///Opens the [PlatformInAppBrowser] instance with the given [assetFilePath] file.
|
///Opens the [PlatformInAppBrowser] instance with the given [assetFilePath] file.
|
||||||
///
|
///
|
||||||
///[options]: Options for the [PlatformInAppBrowser].
|
///[options]: Options for the [PlatformInAppBrowser].
|
||||||
@ -212,10 +221,11 @@ abstract class PlatformInAppBrowser extends PlatformInterface
|
|||||||
///
|
///
|
||||||
///[settings]: Settings for the [PlatformInAppBrowser].
|
///[settings]: Settings for the [PlatformInAppBrowser].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> openFile(
|
Future<void> openFile(
|
||||||
{required String assetFilePath,
|
{required String assetFilePath,
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
@ -225,6 +235,7 @@ abstract class PlatformInAppBrowser extends PlatformInterface
|
|||||||
'openFile is not implemented on the current platform');
|
'openFile is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformInAppBrowser.openData}
|
||||||
///Opens the [PlatformInAppBrowser] instance with [data] as a content, using [baseUrl] as the base URL for it.
|
///Opens the [PlatformInAppBrowser] instance with [data] as a content, using [baseUrl] as the base URL for it.
|
||||||
///
|
///
|
||||||
///The [mimeType] parameter specifies the format of the data. The default value is `"text/html"`.
|
///The [mimeType] parameter specifies the format of the data. The default value is `"text/html"`.
|
||||||
@ -237,10 +248,11 @@ abstract class PlatformInAppBrowser extends PlatformInterface
|
|||||||
///
|
///
|
||||||
///[settings]: Settings for the [PlatformInAppBrowser].
|
///[settings]: Settings for the [PlatformInAppBrowser].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> openData(
|
Future<void> openData(
|
||||||
{required String data,
|
{required String data,
|
||||||
String mimeType = "text/html",
|
String mimeType = "text/html",
|
||||||
@ -255,178 +267,212 @@ abstract class PlatformInAppBrowser extends PlatformInterface
|
|||||||
'openData is not implemented on the current platform');
|
'openData is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformInAppBrowser.openWithSystemBrowser}
|
||||||
///This is a static method that opens an [url] in the system browser. You wont be able to use the [PlatformInAppBrowser] methods here!
|
///This is a static method that opens an [url] in the system browser. You wont be able to use the [PlatformInAppBrowser] methods here!
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> openWithSystemBrowser({required WebUri url}) {
|
Future<void> openWithSystemBrowser({required WebUri url}) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'openWithSystemBrowser is not implemented on the current platform');
|
'openWithSystemBrowser is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformInAppBrowser.addMenuItem}
|
||||||
///Adds a [InAppBrowserMenuItem] to the menu.
|
///Adds a [InAppBrowserMenuItem] to the menu.
|
||||||
///If the browser is already open,
|
///If the browser is already open,
|
||||||
///it will take effect the next time it is opened.
|
///it will take effect the next time it is opened.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
///- iOS 14.0+
|
///- iOS 14.0+
|
||||||
|
///{@endtemplate}
|
||||||
void addMenuItem(InAppBrowserMenuItem menuItem) {
|
void addMenuItem(InAppBrowserMenuItem menuItem) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'addMenuItem is not implemented on the current platform');
|
'addMenuItem is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformInAppBrowser.addMenuItems}
|
||||||
///Adds a list of [InAppBrowserMenuItem] to the menu.
|
///Adds a list of [InAppBrowserMenuItem] to the menu.
|
||||||
///If the browser is already open,
|
///If the browser is already open,
|
||||||
///it will take effect the next time it is opened.
|
///it will take effect the next time it is opened.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
///- iOS 14.0+
|
///- iOS 14.0+
|
||||||
|
///{@endtemplate}
|
||||||
void addMenuItems(List<InAppBrowserMenuItem> menuItems) {
|
void addMenuItems(List<InAppBrowserMenuItem> menuItems) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'addMenuItems is not implemented on the current platform');
|
'addMenuItems is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformInAppBrowser.removeMenuItem}
|
||||||
///Removes the [menuItem] from the list.
|
///Removes the [menuItem] from the list.
|
||||||
///Returns `true` if it was in the list, `false` otherwise.
|
///Returns `true` if it was in the list, `false` otherwise.
|
||||||
///If the browser is already open,
|
///If the browser is already open,
|
||||||
///it will take effect the next time it is opened.
|
///it will take effect the next time it is opened.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
///- iOS 14.0+
|
///- iOS 14.0+
|
||||||
|
///{@endtemplate}
|
||||||
bool removeMenuItem(InAppBrowserMenuItem menuItem) {
|
bool removeMenuItem(InAppBrowserMenuItem menuItem) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'removeMenuItem is not implemented on the current platform');
|
'removeMenuItem is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformInAppBrowser.removeMenuItems}
|
||||||
///Removes a list of [menuItems] from the list.
|
///Removes a list of [menuItems] from the list.
|
||||||
///If the browser is already open,
|
///If the browser is already open,
|
||||||
///it will take effect the next time it is opened.
|
///it will take effect the next time it is opened.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
///- iOS 14.0+
|
///- iOS 14.0+
|
||||||
|
///{@endtemplate}
|
||||||
void removeMenuItems(List<InAppBrowserMenuItem> menuItems) {
|
void removeMenuItems(List<InAppBrowserMenuItem> menuItems) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'removeMenuItems is not implemented on the current platform');
|
'removeMenuItems is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformInAppBrowser.removeAllMenuItem}
|
||||||
///Removes all the menu items from the list.
|
///Removes all the menu items from the list.
|
||||||
///If the browser is already open,
|
///If the browser is already open,
|
||||||
///it will take effect the next time it is opened.
|
///it will take effect the next time it is opened.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android
|
///- Android
|
||||||
///- iOS 14.0+
|
///- iOS 14.0+
|
||||||
|
///{@endtemplate}
|
||||||
void removeAllMenuItem() {
|
void removeAllMenuItem() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'removeAllMenuItem is not implemented on the current platform');
|
'removeAllMenuItem is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformInAppBrowser.hasMenuItem}
|
||||||
///Returns `true` if the [menuItem] has been already added, otherwise `false`.
|
///Returns `true` if the [menuItem] has been already added, otherwise `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS 14.0+
|
///- iOS 14.0+
|
||||||
|
///{@endtemplate}
|
||||||
bool hasMenuItem(InAppBrowserMenuItem menuItem) {
|
bool hasMenuItem(InAppBrowserMenuItem menuItem) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'hasMenuItem is not implemented on the current platform');
|
'hasMenuItem is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
///Displays an [PlatformInAppBrowser] window that was opened hidden. Calling this has no effect if the [PlatformInAppBrowser] was already visible.
|
///{@template flutter_inappwebview_platform_interface.PlatformInAppBrowser.show}
|
||||||
|
///Displays a [PlatformInAppBrowser] window that was opened hidden. Calling this has no effect if the [PlatformInAppBrowser] was already visible.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> show() {
|
Future<void> show() {
|
||||||
throw UnimplementedError('show is not implemented on the current platform');
|
throw UnimplementedError('show is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformInAppBrowser.hide}
|
||||||
///Hides the [PlatformInAppBrowser] window. Calling this has no effect if the [PlatformInAppBrowser] was already hidden.
|
///Hides the [PlatformInAppBrowser] window. Calling this has no effect if the [PlatformInAppBrowser] was already hidden.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> hide() {
|
Future<void> hide() {
|
||||||
throw UnimplementedError('hide is not implemented on the current platform');
|
throw UnimplementedError('hide is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformInAppBrowser.close}
|
||||||
///Closes the [PlatformInAppBrowser] window.
|
///Closes the [PlatformInAppBrowser] window.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> close() {
|
Future<void> close() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'close is not implemented on the current platform');
|
'close is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformInAppBrowser.isHidden}
|
||||||
///Check if the Web View of the [PlatformInAppBrowser] instance is hidden.
|
///Check if the Web View of the [PlatformInAppBrowser] instance is hidden.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
|
///{@endtemplate}
|
||||||
Future<bool> isHidden() {
|
Future<bool> isHidden() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'isHidden is not implemented on the current platform');
|
'isHidden is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformInAppBrowser.setOptions}
|
||||||
///Use [setSettings] instead.
|
///Use [setSettings] instead.
|
||||||
|
///{@endtemplate}
|
||||||
@Deprecated('Use setSettings instead')
|
@Deprecated('Use setSettings instead')
|
||||||
Future<void> setOptions({required InAppBrowserClassOptions options}) {
|
Future<void> setOptions({required InAppBrowserClassOptions options}) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'setOptions is not implemented on the current platform');
|
'setOptions is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformInAppBrowser.getOptions}
|
||||||
///Use [getSettings] instead.
|
///Use [getSettings] instead.
|
||||||
|
///{@endtemplate}
|
||||||
@Deprecated('Use getSettings instead')
|
@Deprecated('Use getSettings instead')
|
||||||
Future<InAppBrowserClassOptions?> getOptions() {
|
Future<InAppBrowserClassOptions?> getOptions() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'getOptions is not implemented on the current platform');
|
'getOptions is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformInAppBrowser.setSettings}
|
||||||
///Sets the [PlatformInAppBrowser] settings with the new [settings] and evaluates them.
|
///Sets the [PlatformInAppBrowser] settings with the new [settings] and evaluates them.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> setSettings({required InAppBrowserClassSettings settings}) {
|
Future<void> setSettings({required InAppBrowserClassSettings settings}) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'setSettings is not implemented on the current platform');
|
'setSettings is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformInAppBrowser.getSettings}
|
||||||
///Gets the current [PlatformInAppBrowser] settings. Returns `null` if it wasn't able to get them.
|
///Gets the current [PlatformInAppBrowser] settings. Returns `null` if it wasn't able to get them.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
|
///{@endtemplate}
|
||||||
Future<InAppBrowserClassSettings?> getSettings() {
|
Future<InAppBrowserClassSettings?> getSettings() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'getSettings is not implemented on the current platform');
|
'getSettings is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformInAppBrowser.isOpened}
|
||||||
///Returns `true` if the [PlatformInAppBrowser] instance is opened, otherwise `false`.
|
///Returns `true` if the [PlatformInAppBrowser] instance is opened, otherwise `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
|
///{@endtemplate}
|
||||||
bool isOpened() {
|
bool isOpened() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'isOpened is not implemented on the current platform');
|
'isOpened is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformInAppBrowser.dispose}
|
||||||
///Disposes the channel and controllers.
|
///Disposes the channel and controllers.
|
||||||
|
///{@endtemplate}
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
@ -437,7 +483,7 @@ abstract class PlatformInAppBrowser extends PlatformInterface
|
|||||||
abstract class PlatformInAppBrowserEvents {
|
abstract class PlatformInAppBrowserEvents {
|
||||||
///Event fired when the [PlatformInAppBrowser] is created.
|
///Event fired when the [PlatformInAppBrowser] is created.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -445,7 +491,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
|
|
||||||
///Event fired when the [PlatformInAppBrowser] window is closed.
|
///Event fired when the [PlatformInAppBrowser] window is closed.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -453,7 +499,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
|
|
||||||
///Event fired when the [PlatformInAppBrowser] starts to load an [url].
|
///Event fired when the [PlatformInAppBrowser] starts to load an [url].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewClient.onPageStarted](https://developer.android.com/reference/android/webkit/WebViewClient#onPageStarted(android.webkit.WebView,%20java.lang.String,%20android.graphics.Bitmap)))
|
///- Android native WebView ([Official API - WebViewClient.onPageStarted](https://developer.android.com/reference/android/webkit/WebViewClient#onPageStarted(android.webkit.WebView,%20java.lang.String,%20android.graphics.Bitmap)))
|
||||||
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455621-webview))
|
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455621-webview))
|
||||||
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455621-webview))
|
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455621-webview))
|
||||||
@ -461,7 +507,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
|
|
||||||
///Event fired when the [PlatformInAppBrowser] finishes loading an [url].
|
///Event fired when the [PlatformInAppBrowser] finishes loading an [url].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewClient.onPageFinished](https://developer.android.com/reference/android/webkit/WebViewClient#onPageFinished(android.webkit.WebView,%20java.lang.String)))
|
///- Android native WebView ([Official API - WebViewClient.onPageFinished](https://developer.android.com/reference/android/webkit/WebViewClient#onPageFinished(android.webkit.WebView,%20java.lang.String)))
|
||||||
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455629-webview))
|
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455629-webview))
|
||||||
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455629-webview))
|
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455629-webview))
|
||||||
@ -473,7 +519,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
|
|
||||||
///Event fired when the [PlatformInAppBrowser] encounters an [error] loading a [request].
|
///Event fired when the [PlatformInAppBrowser] encounters an [error] loading a [request].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewClient.onReceivedError](https://developer.android.com/reference/android/webkit/WebViewClient#onReceivedError(android.webkit.WebView,%20android.webkit.WebResourceRequest,%20android.webkit.WebResourceError)))
|
///- Android native WebView ([Official API - WebViewClient.onReceivedError](https://developer.android.com/reference/android/webkit/WebViewClient#onReceivedError(android.webkit.WebView,%20android.webkit.WebResourceRequest,%20android.webkit.WebResourceError)))
|
||||||
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455623-webview))
|
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455623-webview))
|
||||||
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455623-webview))
|
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455623-webview))
|
||||||
@ -491,7 +537,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///
|
///
|
||||||
///**NOTE**: available on Android 23+.
|
///**NOTE**: available on Android 23+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewClient.onReceivedHttpError](https://developer.android.com/reference/android/webkit/WebViewClient#onReceivedHttpError(android.webkit.WebView,%20android.webkit.WebResourceRequest,%20android.webkit.WebResourceResponse)))
|
///- Android native WebView ([Official API - WebViewClient.onReceivedHttpError](https://developer.android.com/reference/android/webkit/WebViewClient#onReceivedHttpError(android.webkit.WebView,%20android.webkit.WebResourceRequest,%20android.webkit.WebResourceResponse)))
|
||||||
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455643-webview))
|
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455643-webview))
|
||||||
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455643-webview))
|
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455643-webview))
|
||||||
@ -500,7 +546,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
|
|
||||||
///Event fired when the current [progress] (range 0-100) of loading a page is changed.
|
///Event fired when the current [progress] (range 0-100) of loading a page is changed.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebChromeClient.onProgressChanged](https://developer.android.com/reference/android/webkit/WebChromeClient#onProgressChanged(android.webkit.WebView,%20int)))
|
///- Android native WebView ([Official API - WebChromeClient.onProgressChanged](https://developer.android.com/reference/android/webkit/WebChromeClient#onProgressChanged(android.webkit.WebView,%20int)))
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -508,7 +554,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
|
|
||||||
///Event fired when the [PlatformInAppBrowser] webview receives a [ConsoleMessage].
|
///Event fired when the [PlatformInAppBrowser] webview receives a [ConsoleMessage].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebChromeClient.onConsoleMessage](https://developer.android.com/reference/android/webkit/WebChromeClient#onConsoleMessage(android.webkit.ConsoleMessage)))
|
///- Android native WebView ([Official API - WebChromeClient.onConsoleMessage](https://developer.android.com/reference/android/webkit/WebChromeClient#onConsoleMessage(android.webkit.ConsoleMessage)))
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -526,7 +572,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///
|
///
|
||||||
///**NOTE**: In order to be able to listen this event, you need to set [InAppWebViewSettings.useShouldOverrideUrlLoading] setting to `true`.
|
///**NOTE**: In order to be able to listen this event, you need to set [InAppWebViewSettings.useShouldOverrideUrlLoading] setting to `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewClient.shouldOverrideUrlLoading](https://developer.android.com/reference/android/webkit/WebViewClient#shouldOverrideUrlLoading(android.webkit.WebView,%20java.lang.String)))
|
///- Android native WebView ([Official API - WebViewClient.shouldOverrideUrlLoading](https://developer.android.com/reference/android/webkit/WebViewClient#shouldOverrideUrlLoading(android.webkit.WebView,%20java.lang.String)))
|
||||||
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455641-webview))
|
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455641-webview))
|
||||||
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455641-webview))
|
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455641-webview))
|
||||||
@ -539,7 +585,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///
|
///
|
||||||
///**NOTE**: In order to be able to listen this event, you need to set [InAppWebViewSettings.useOnLoadResource] and [InAppWebViewSettings.javaScriptEnabled] setting to `true`.
|
///**NOTE**: In order to be able to listen this event, you need to set [InAppWebViewSettings.useOnLoadResource] and [InAppWebViewSettings.javaScriptEnabled] setting to `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -553,7 +599,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///
|
///
|
||||||
///**NOTE for MacOS**: this method is implemented with using JavaScript.
|
///**NOTE for MacOS**: this method is implemented with using JavaScript.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebView.onScrollChanged](https://developer.android.com/reference/android/webkit/WebView#onScrollChanged(int,%20int,%20int,%20int)))
|
///- Android native WebView ([Official API - WebView.onScrollChanged](https://developer.android.com/reference/android/webkit/WebView#onScrollChanged(int,%20int,%20int,%20int)))
|
||||||
///- iOS ([Official API - UIScrollViewDelegate.scrollViewDidScroll](https://developer.apple.com/documentation/uikit/uiscrollviewdelegate/1619392-scrollviewdidscroll))
|
///- iOS ([Official API - UIScrollViewDelegate.scrollViewDidScroll](https://developer.apple.com/documentation/uikit/uiscrollviewdelegate/1619392-scrollviewdidscroll))
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -570,7 +616,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///
|
///
|
||||||
///**NOTE**: In order to be able to listen this event, you need to set [InAppWebViewSettings.useOnDownloadStart] setting to `true`.
|
///**NOTE**: In order to be able to listen this event, you need to set [InAppWebViewSettings.useOnDownloadStart] setting to `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebView.setDownloadListener](https://developer.android.com/reference/android/webkit/WebView#setDownloadListener(android.webkit.DownloadListener)))
|
///- Android native WebView ([Official API - WebView.setDownloadListener](https://developer.android.com/reference/android/webkit/WebView#setDownloadListener(android.webkit.DownloadListener)))
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -585,7 +631,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///Event fired when the [PlatformInAppBrowser] webview finds the `custom-scheme` while loading a resource.
|
///Event fired when the [PlatformInAppBrowser] webview finds the `custom-scheme` while loading a resource.
|
||||||
///Here you can handle the url [request] and return a [CustomSchemeResponse] to load a specific resource encoded to `base64`.
|
///Here you can handle the url [request] and return a [CustomSchemeResponse] to load a specific resource encoded to `base64`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS ([Official API - WKURLSchemeHandler](https://developer.apple.com/documentation/webkit/wkurlschemehandler))
|
///- iOS ([Official API - WKURLSchemeHandler](https://developer.apple.com/documentation/webkit/wkurlschemehandler))
|
||||||
///- MacOS ([Official API - WKURLSchemeHandler](https://developer.apple.com/documentation/webkit/wkurlschemehandler))
|
///- MacOS ([Official API - WKURLSchemeHandler](https://developer.apple.com/documentation/webkit/wkurlschemehandler))
|
||||||
@ -622,7 +668,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///Also, note that calling [PlatformInAppWebViewController.setSettings] method using the controller of the new created WebView,
|
///Also, note that calling [PlatformInAppWebViewController.setSettings] method using the controller of the new created WebView,
|
||||||
///it will update also the WebView options of the caller WebView.
|
///it will update also the WebView options of the caller WebView.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebChromeClient.onCreateWindow](https://developer.android.com/reference/android/webkit/WebChromeClient#onCreateWindow(android.webkit.WebView,%20boolean,%20boolean,%20android.os.Message)))
|
///- Android native WebView ([Official API - WebChromeClient.onCreateWindow](https://developer.android.com/reference/android/webkit/WebChromeClient#onCreateWindow(android.webkit.WebView,%20boolean,%20boolean,%20android.os.Message)))
|
||||||
///- iOS ([Official API - WKUIDelegate.webView](https://developer.apple.com/documentation/webkit/wkuidelegate/1536907-webview))
|
///- iOS ([Official API - WKUIDelegate.webView](https://developer.apple.com/documentation/webkit/wkuidelegate/1536907-webview))
|
||||||
///- MacOS ([Official API - WKUIDelegate.webView](https://developer.apple.com/documentation/webkit/wkuidelegate/1536907-webview))
|
///- MacOS ([Official API - WKUIDelegate.webView](https://developer.apple.com/documentation/webkit/wkuidelegate/1536907-webview))
|
||||||
@ -633,7 +679,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///Event fired when the host application should close the given WebView and remove it from the view system if necessary.
|
///Event fired when the host application should close the given WebView and remove it from the view system if necessary.
|
||||||
///At this point, WebCore has stopped any loading in this window and has removed any cross-scripting ability in javascript.
|
///At this point, WebCore has stopped any loading in this window and has removed any cross-scripting ability in javascript.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebChromeClient.onCloseWindow](https://developer.android.com/reference/android/webkit/WebChromeClient#onCloseWindow(android.webkit.WebView)))
|
///- Android native WebView ([Official API - WebChromeClient.onCloseWindow](https://developer.android.com/reference/android/webkit/WebChromeClient#onCloseWindow(android.webkit.WebView)))
|
||||||
///- iOS ([Official API - WKUIDelegate.webViewDidClose](https://developer.apple.com/documentation/webkit/wkuidelegate/1537390-webviewdidclose))
|
///- iOS ([Official API - WKUIDelegate.webViewDidClose](https://developer.apple.com/documentation/webkit/wkuidelegate/1537390-webviewdidclose))
|
||||||
///- MacOS ([Official API - WKUIDelegate.webViewDidClose](https://developer.apple.com/documentation/webkit/wkuidelegate/1537390-webviewdidclose))
|
///- MacOS ([Official API - WKUIDelegate.webViewDidClose](https://developer.apple.com/documentation/webkit/wkuidelegate/1537390-webviewdidclose))
|
||||||
@ -642,7 +688,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///Event fired when the JavaScript `window` object of the WebView has received focus.
|
///Event fired when the JavaScript `window` object of the WebView has received focus.
|
||||||
///This is the result of the `focus` javascript event applied to the `window` object.
|
///This is the result of the `focus` javascript event applied to the `window` object.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -651,7 +697,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///Event fired when the JavaScript `window` object of the WebView has lost focus.
|
///Event fired when the JavaScript `window` object of the WebView has lost focus.
|
||||||
///This is the result of the `blur` javascript event applied to the `window` object.
|
///This is the result of the `blur` javascript event applied to the `window` object.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -662,7 +708,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///
|
///
|
||||||
///[jsAlertRequest] contains the message to be displayed in the alert dialog and the of the page requesting the dialog.
|
///[jsAlertRequest] contains the message to be displayed in the alert dialog and the of the page requesting the dialog.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebChromeClient.onJsAlert](https://developer.android.com/reference/android/webkit/WebChromeClient#onJsAlert(android.webkit.WebView,%20java.lang.String,%20java.lang.String,%20android.webkit.JsResult)))
|
///- Android native WebView ([Official API - WebChromeClient.onJsAlert](https://developer.android.com/reference/android/webkit/WebChromeClient#onJsAlert(android.webkit.WebView,%20java.lang.String,%20java.lang.String,%20android.webkit.JsResult)))
|
||||||
///- iOS ([Official API - WKUIDelegate.webView](https://developer.apple.com/documentation/webkit/wkuidelegate/1537406-webview))
|
///- iOS ([Official API - WKUIDelegate.webView](https://developer.apple.com/documentation/webkit/wkuidelegate/1537406-webview))
|
||||||
///- MacOS ([Official API - WKUIDelegate.webView](https://developer.apple.com/documentation/webkit/wkuidelegate/1537406-webview))
|
///- MacOS ([Official API - WKUIDelegate.webView](https://developer.apple.com/documentation/webkit/wkuidelegate/1537406-webview))
|
||||||
@ -675,7 +721,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///
|
///
|
||||||
///[jsConfirmRequest] contains the message to be displayed in the confirm dialog and the of the page requesting the dialog.
|
///[jsConfirmRequest] contains the message to be displayed in the confirm dialog and the of the page requesting the dialog.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebChromeClient.onJsConfirm](https://developer.android.com/reference/android/webkit/WebChromeClient#onJsConfirm(android.webkit.WebView,%20java.lang.String,%20java.lang.String,%20android.webkit.JsResult)))
|
///- Android native WebView ([Official API - WebChromeClient.onJsConfirm](https://developer.android.com/reference/android/webkit/WebChromeClient#onJsConfirm(android.webkit.WebView,%20java.lang.String,%20java.lang.String,%20android.webkit.JsResult)))
|
||||||
///- iOS ([Official API - WKUIDelegate.webView](https://developer.apple.com/documentation/webkit/wkuidelegate/1536489-webview))
|
///- iOS ([Official API - WKUIDelegate.webView](https://developer.apple.com/documentation/webkit/wkuidelegate/1536489-webview))
|
||||||
///- MacOS ([Official API - WKUIDelegate.webView](https://developer.apple.com/documentation/webkit/wkuidelegate/1536489-webview))
|
///- MacOS ([Official API - WKUIDelegate.webView](https://developer.apple.com/documentation/webkit/wkuidelegate/1536489-webview))
|
||||||
@ -688,7 +734,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///
|
///
|
||||||
///[jsPromptRequest] contains the message to be displayed in the prompt dialog, the default value displayed in the prompt dialog, and the of the page requesting the dialog.
|
///[jsPromptRequest] contains the message to be displayed in the prompt dialog, the default value displayed in the prompt dialog, and the of the page requesting the dialog.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebChromeClient.onJsPrompt](https://developer.android.com/reference/android/webkit/WebChromeClient#onJsPrompt(android.webkit.WebView,%20java.lang.String,%20java.lang.String,%20java.lang.String,%20android.webkit.JsPromptResult)))
|
///- Android native WebView ([Official API - WebChromeClient.onJsPrompt](https://developer.android.com/reference/android/webkit/WebChromeClient#onJsPrompt(android.webkit.WebView,%20java.lang.String,%20java.lang.String,%20java.lang.String,%20android.webkit.JsPromptResult)))
|
||||||
///- iOS ([Official API - WKUIDelegate.webView](https://developer.apple.com/documentation/webkit/wkuidelegate/1538086-webview))
|
///- iOS ([Official API - WKUIDelegate.webView](https://developer.apple.com/documentation/webkit/wkuidelegate/1538086-webview))
|
||||||
///- MacOS ([Official API - WKUIDelegate.webView](https://developer.apple.com/documentation/webkit/wkuidelegate/1538086-webview))
|
///- MacOS ([Official API - WKUIDelegate.webView](https://developer.apple.com/documentation/webkit/wkuidelegate/1538086-webview))
|
||||||
@ -700,7 +746,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///
|
///
|
||||||
///[challenge] contains data about host, port, protocol, realm, etc. as specified in the [URLAuthenticationChallenge].
|
///[challenge] contains data about host, port, protocol, realm, etc. as specified in the [URLAuthenticationChallenge].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewClient.onReceivedHttpAuthRequest](https://developer.android.com/reference/android/webkit/WebViewClient#onReceivedHttpAuthRequest(android.webkit.WebView,%20android.webkit.HttpAuthHandler,%20java.lang.String,%20java.lang.String)))
|
///- Android native WebView ([Official API - WebViewClient.onReceivedHttpAuthRequest](https://developer.android.com/reference/android/webkit/WebViewClient#onReceivedHttpAuthRequest(android.webkit.WebView,%20android.webkit.HttpAuthHandler,%20java.lang.String,%20java.lang.String)))
|
||||||
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455638-webview))
|
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455638-webview))
|
||||||
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455638-webview))
|
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455638-webview))
|
||||||
@ -714,7 +760,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///
|
///
|
||||||
///[challenge] contains data about host, port, protocol, realm, etc. as specified in the [ServerTrustChallenge].
|
///[challenge] contains data about host, port, protocol, realm, etc. as specified in the [ServerTrustChallenge].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewClient.onReceivedSslError](https://developer.android.com/reference/android/webkit/WebViewClient#onReceivedSslError(android.webkit.WebView,%20android.webkit.SslErrorHandler,%20android.net.http.SslError)))
|
///- Android native WebView ([Official API - WebViewClient.onReceivedSslError](https://developer.android.com/reference/android/webkit/WebViewClient#onReceivedSslError(android.webkit.WebView,%20android.webkit.SslErrorHandler,%20android.net.http.SslError)))
|
||||||
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455638-webview))
|
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455638-webview))
|
||||||
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455638-webview))
|
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455638-webview))
|
||||||
@ -730,7 +776,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///
|
///
|
||||||
///[challenge] contains data about host, port, protocol, realm, etc. as specified in the [ClientCertChallenge].
|
///[challenge] contains data about host, port, protocol, realm, etc. as specified in the [ClientCertChallenge].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewClient.onReceivedClientCertRequest](https://developer.android.com/reference/android/webkit/WebViewClient#onReceivedClientCertRequest(android.webkit.WebView,%20android.webkit.ClientCertRequest)))
|
///- Android native WebView ([Official API - WebViewClient.onReceivedClientCertRequest](https://developer.android.com/reference/android/webkit/WebViewClient#onReceivedClientCertRequest(android.webkit.WebView,%20android.webkit.ClientCertRequest)))
|
||||||
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455638-webview))
|
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455638-webview))
|
||||||
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455638-webview))
|
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455638-webview))
|
||||||
@ -755,7 +801,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///used to intercept ajax requests is loaded as soon as possible so it won't be instantaneous as iOS but just after some milliseconds (< ~100ms).
|
///used to intercept ajax requests is loaded as soon as possible so it won't be instantaneous as iOS but just after some milliseconds (< ~100ms).
|
||||||
///Inside the `window.addEventListener("flutterInAppWebViewPlatformReady")` event, the ajax requests will be intercept for sure.
|
///Inside the `window.addEventListener("flutterInAppWebViewPlatformReady")` event, the ajax requests will be intercept for sure.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -774,7 +820,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///used to intercept ajax requests is loaded as soon as possible so it won't be instantaneous as iOS but just after some milliseconds (< ~100ms).
|
///used to intercept ajax requests is loaded as soon as possible so it won't be instantaneous as iOS but just after some milliseconds (< ~100ms).
|
||||||
///Inside the `window.addEventListener("flutterInAppWebViewPlatformReady")` event, the ajax requests will be intercept for sure.
|
///Inside the `window.addEventListener("flutterInAppWebViewPlatformReady")` event, the ajax requests will be intercept for sure.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -793,7 +839,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///used to intercept ajax requests is loaded as soon as possible so it won't be instantaneous as iOS but just after some milliseconds (< ~100ms).
|
///used to intercept ajax requests is loaded as soon as possible so it won't be instantaneous as iOS but just after some milliseconds (< ~100ms).
|
||||||
///Inside the `window.addEventListener("flutterInAppWebViewPlatformReady")` event, the ajax requests will be intercept for sure.
|
///Inside the `window.addEventListener("flutterInAppWebViewPlatformReady")` event, the ajax requests will be intercept for sure.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -812,7 +858,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///used to intercept fetch requests is loaded as soon as possible so it won't be instantaneous as iOS but just after some milliseconds (< ~100ms).
|
///used to intercept fetch requests is loaded as soon as possible so it won't be instantaneous as iOS but just after some milliseconds (< ~100ms).
|
||||||
///Inside the `window.addEventListener("flutterInAppWebViewPlatformReady")` event, the fetch requests will be intercept for sure.
|
///Inside the `window.addEventListener("flutterInAppWebViewPlatformReady")` event, the fetch requests will be intercept for sure.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -830,7 +876,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///
|
///
|
||||||
///[isReload] indicates if this url is being reloaded. Available only on Android.
|
///[isReload] indicates if this url is being reloaded. Available only on Android.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewClient.doUpdateVisitedHistory](https://developer.android.com/reference/android/webkit/WebViewClient#doUpdateVisitedHistory(android.webkit.WebView,%20java.lang.String,%20boolean)))
|
///- Android native WebView ([Official API - WebViewClient.doUpdateVisitedHistory](https://developer.android.com/reference/android/webkit/WebViewClient#doUpdateVisitedHistory(android.webkit.WebView,%20java.lang.String,%20boolean)))
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -848,7 +894,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///
|
///
|
||||||
///[printJobController] represents the controller of the print job created.
|
///[printJobController] represents the controller of the print job created.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -861,14 +907,14 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///
|
///
|
||||||
///[hitTestResult] represents the hit result for hitting an HTML elements.
|
///[hitTestResult] represents the hit result for hitting an HTML elements.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - View.setOnLongClickListener](https://developer.android.com/reference/android/view/View#setOnLongClickListener(android.view.View.OnLongClickListener)))
|
///- Android native WebView ([Official API - View.setOnLongClickListener](https://developer.android.com/reference/android/view/View#setOnLongClickListener(android.view.View.OnLongClickListener)))
|
||||||
///- iOS ([Official API - UILongPressGestureRecognizer](https://developer.apple.com/documentation/uikit/uilongpressgesturerecognizer))
|
///- iOS ([Official API - UILongPressGestureRecognizer](https://developer.apple.com/documentation/uikit/uilongpressgesturerecognizer))
|
||||||
void onLongPressHitTestResult(InAppWebViewHitTestResult hitTestResult) {}
|
void onLongPressHitTestResult(InAppWebViewHitTestResult hitTestResult) {}
|
||||||
|
|
||||||
///Event fired when the current page has entered full screen mode.
|
///Event fired when the current page has entered full screen mode.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebChromeClient.onShowCustomView](https://developer.android.com/reference/android/webkit/WebChromeClient#onShowCustomView(android.view.View,%20android.webkit.WebChromeClient.CustomViewCallback)))
|
///- Android native WebView ([Official API - WebChromeClient.onShowCustomView](https://developer.android.com/reference/android/webkit/WebChromeClient#onShowCustomView(android.view.View,%20android.webkit.WebChromeClient.CustomViewCallback)))
|
||||||
///- iOS ([Official API - UIWindow.didBecomeVisibleNotification](https://developer.apple.com/documentation/uikit/uiwindow/1621621-didbecomevisiblenotification))
|
///- iOS ([Official API - UIWindow.didBecomeVisibleNotification](https://developer.apple.com/documentation/uikit/uiwindow/1621621-didbecomevisiblenotification))
|
||||||
///- MacOS ([Official API - NSWindow.didEnterFullScreenNotification](https://developer.apple.com/documentation/appkit/nswindow/1419651-didenterfullscreennotification))
|
///- MacOS ([Official API - NSWindow.didEnterFullScreenNotification](https://developer.apple.com/documentation/appkit/nswindow/1419651-didenterfullscreennotification))
|
||||||
@ -876,7 +922,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
|
|
||||||
///Event fired when the current page has exited full screen mode.
|
///Event fired when the current page has exited full screen mode.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebChromeClient.onHideCustomView](https://developer.android.com/reference/android/webkit/WebChromeClient#onHideCustomView()))
|
///- Android native WebView ([Official API - WebChromeClient.onHideCustomView](https://developer.android.com/reference/android/webkit/WebChromeClient#onHideCustomView()))
|
||||||
///- iOS ([Official API - UIWindow.didBecomeHiddenNotification](https://developer.apple.com/documentation/uikit/uiwindow/1621617-didbecomehiddennotification))
|
///- iOS ([Official API - UIWindow.didBecomeHiddenNotification](https://developer.apple.com/documentation/uikit/uiwindow/1621617-didbecomehiddennotification))
|
||||||
///- MacOS ([Official API - NSWindow.didExitFullScreenNotification](https://developer.apple.com/documentation/appkit/nswindow/1419177-didexitfullscreennotification))
|
///- MacOS ([Official API - NSWindow.didExitFullScreenNotification](https://developer.apple.com/documentation/appkit/nswindow/1419177-didexitfullscreennotification))
|
||||||
@ -889,7 +935,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///
|
///
|
||||||
///[url] represents the URL corresponding to the page navigation that triggered this callback.
|
///[url] represents the URL corresponding to the page navigation that triggered this callback.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewClient.onPageCommitVisible](https://developer.android.com/reference/android/webkit/WebViewClient#onPageCommitVisible(android.webkit.WebView,%20java.lang.String)))
|
///- Android native WebView ([Official API - WebViewClient.onPageCommitVisible](https://developer.android.com/reference/android/webkit/WebViewClient#onPageCommitVisible(android.webkit.WebView,%20java.lang.String)))
|
||||||
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455635-webview))
|
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455635-webview))
|
||||||
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455635-webview))
|
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455635-webview))
|
||||||
@ -899,7 +945,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///
|
///
|
||||||
///[title] represents the string containing the new title of the document.
|
///[title] represents the string containing the new title of the document.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebChromeClient.onReceivedTitle](https://developer.android.com/reference/android/webkit/WebChromeClient#onReceivedTitle(android.webkit.WebView,%20java.lang.String)))
|
///- Android native WebView ([Official API - WebChromeClient.onReceivedTitle](https://developer.android.com/reference/android/webkit/WebChromeClient#onReceivedTitle(android.webkit.WebView,%20java.lang.String)))
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -915,7 +961,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///
|
///
|
||||||
///[clampedY] is `true` if [y] was clamped to an over-scroll boundary.
|
///[clampedY] is `true` if [y] was clamped to an over-scroll boundary.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebView.onOverScrolled](https://developer.android.com/reference/android/webkit/WebView#onOverScrolled(int,%20int,%20boolean,%20boolean)))
|
///- Android native WebView ([Official API - WebView.onOverScrolled](https://developer.android.com/reference/android/webkit/WebView#onOverScrolled(int,%20int,%20boolean,%20boolean)))
|
||||||
///- iOS
|
///- iOS
|
||||||
void onOverScrolled(int x, int y, bool clampedX, bool clampedY) {}
|
void onOverScrolled(int x, int y, bool clampedX, bool clampedY) {}
|
||||||
@ -926,7 +972,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///
|
///
|
||||||
///[newScale] The new zoom scale factor.ì
|
///[newScale] The new zoom scale factor.ì
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewClient.onScaleChanged](https://developer.android.com/reference/android/webkit/WebViewClient#onScaleChanged(android.webkit.WebView,%20float,%20float)))
|
///- Android native WebView ([Official API - WebViewClient.onScaleChanged](https://developer.android.com/reference/android/webkit/WebViewClient#onScaleChanged(android.webkit.WebView,%20float,%20float)))
|
||||||
///- iOS ([Official API - UIScrollViewDelegate.scrollViewDidZoom](https://developer.apple.com/documentation/uikit/uiscrollviewdelegate/1619409-scrollviewdidzoom))
|
///- iOS ([Official API - UIScrollViewDelegate.scrollViewDidZoom](https://developer.apple.com/documentation/uikit/uiscrollviewdelegate/1619409-scrollviewdidzoom))
|
||||||
void onZoomScaleChanged(double oldScale, double newScale) {}
|
void onZoomScaleChanged(double oldScale, double newScale) {}
|
||||||
@ -947,7 +993,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///
|
///
|
||||||
///**NOTE**: available only on Android 27+.
|
///**NOTE**: available only on Android 27+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewClient.onSafeBrowsingHit](https://developer.android.com/reference/android/webkit/WebViewClient#onSafeBrowsingHit(android.webkit.WebView,%20android.webkit.WebResourceRequest,%20int,%20android.webkit.SafeBrowsingResponse)))
|
///- Android native WebView ([Official API - WebViewClient.onSafeBrowsingHit](https://developer.android.com/reference/android/webkit/WebViewClient#onSafeBrowsingHit(android.webkit.WebView,%20android.webkit.WebResourceRequest,%20int,%20android.webkit.SafeBrowsingResponse)))
|
||||||
Future<SafeBrowsingResponse?>? onSafeBrowsingHit(
|
Future<SafeBrowsingResponse?>? onSafeBrowsingHit(
|
||||||
WebUri url, SafeBrowsingThreat? threatType) {
|
WebUri url, SafeBrowsingThreat? threatType) {
|
||||||
@ -972,7 +1018,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///
|
///
|
||||||
///**NOTE for MacOS**: available only on iOS 12.0+. The default [PermissionResponse.action] is [PermissionResponseAction.PROMPT].
|
///**NOTE for MacOS**: available only on iOS 12.0+. The default [PermissionResponse.action] is [PermissionResponseAction.PROMPT].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebChromeClient.onPermissionRequest](https://developer.android.com/reference/android/webkit/WebChromeClient#onPermissionRequest(android.webkit.PermissionRequest)))
|
///- Android native WebView ([Official API - WebChromeClient.onPermissionRequest](https://developer.android.com/reference/android/webkit/WebChromeClient#onPermissionRequest(android.webkit.PermissionRequest)))
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -994,7 +1040,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///
|
///
|
||||||
///[origin] represents the origin of the web content attempting to use the Geolocation API.
|
///[origin] represents the origin of the web content attempting to use the Geolocation API.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebChromeClient.onGeolocationPermissionsShowPrompt](https://developer.android.com/reference/android/webkit/WebChromeClient#onGeolocationPermissionsShowPrompt(java.lang.String,%20android.webkit.GeolocationPermissions.Callback)))
|
///- Android native WebView ([Official API - WebChromeClient.onGeolocationPermissionsShowPrompt](https://developer.android.com/reference/android/webkit/WebChromeClient#onGeolocationPermissionsShowPrompt(java.lang.String,%20android.webkit.GeolocationPermissions.Callback)))
|
||||||
Future<GeolocationPermissionShowPromptResponse?>?
|
Future<GeolocationPermissionShowPromptResponse?>?
|
||||||
onGeolocationPermissionsShowPrompt(String origin) {
|
onGeolocationPermissionsShowPrompt(String origin) {
|
||||||
@ -1008,7 +1054,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///Notify the host application that a request for Geolocation permissions, made with a previous call to [onGeolocationPermissionsShowPrompt] has been canceled.
|
///Notify the host application that a request for Geolocation permissions, made with a previous call to [onGeolocationPermissionsShowPrompt] has been canceled.
|
||||||
///Any related UI should therefore be hidden.
|
///Any related UI should therefore be hidden.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebChromeClient.onGeolocationPermissionsHidePrompt](https://developer.android.com/reference/android/webkit/WebChromeClient#onGeolocationPermissionsHidePrompt()))
|
///- Android native WebView ([Official API - WebChromeClient.onGeolocationPermissionsHidePrompt](https://developer.android.com/reference/android/webkit/WebChromeClient#onGeolocationPermissionsHidePrompt()))
|
||||||
void onGeolocationPermissionsHidePrompt() {}
|
void onGeolocationPermissionsHidePrompt() {}
|
||||||
|
|
||||||
@ -1033,7 +1079,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///
|
///
|
||||||
///**NOTE**: In order to be able to listen this event, you need to set [InAppWebViewSettings.useShouldInterceptRequest] option to `true`.
|
///**NOTE**: In order to be able to listen this event, you need to set [InAppWebViewSettings.useShouldInterceptRequest] option to `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewClient.shouldInterceptRequest](https://developer.android.com/reference/android/webkit/WebViewClient#shouldInterceptRequest(android.webkit.WebView,%20android.webkit.WebResourceRequest)))
|
///- Android native WebView ([Official API - WebViewClient.shouldInterceptRequest](https://developer.android.com/reference/android/webkit/WebViewClient#shouldInterceptRequest(android.webkit.WebView,%20android.webkit.WebResourceRequest)))
|
||||||
Future<WebResourceResponse?>? shouldInterceptRequest(
|
Future<WebResourceResponse?>? shouldInterceptRequest(
|
||||||
WebResourceRequest request) {
|
WebResourceRequest request) {
|
||||||
@ -1064,7 +1110,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///
|
///
|
||||||
///**NOTE**: available only on Android 29+.
|
///**NOTE**: available only on Android 29+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewRenderProcessClient.onRenderProcessUnresponsive](https://developer.android.com/reference/android/webkit/WebViewRenderProcessClient#onRenderProcessUnresponsive(android.webkit.WebView,%20android.webkit.WebViewRenderProcess)))
|
///- Android native WebView ([Official API - WebViewRenderProcessClient.onRenderProcessUnresponsive](https://developer.android.com/reference/android/webkit/WebViewRenderProcessClient#onRenderProcessUnresponsive(android.webkit.WebView,%20android.webkit.WebViewRenderProcess)))
|
||||||
Future<WebViewRenderProcessAction?>? onRenderProcessUnresponsive(
|
Future<WebViewRenderProcessAction?>? onRenderProcessUnresponsive(
|
||||||
WebUri? url) {
|
WebUri? url) {
|
||||||
@ -1088,7 +1134,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///
|
///
|
||||||
///**NOTE**: available only on Android 29+.
|
///**NOTE**: available only on Android 29+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewRenderProcessClient.onRenderProcessResponsive](https://developer.android.com/reference/android/webkit/WebViewRenderProcessClient#onRenderProcessResponsive(android.webkit.WebView,%20android.webkit.WebViewRenderProcess)))
|
///- Android native WebView ([Official API - WebViewRenderProcessClient.onRenderProcessResponsive](https://developer.android.com/reference/android/webkit/WebViewRenderProcessClient#onRenderProcessResponsive(android.webkit.WebView,%20android.webkit.WebViewRenderProcess)))
|
||||||
Future<WebViewRenderProcessAction?>? onRenderProcessResponsive(WebUri? url) {
|
Future<WebViewRenderProcessAction?>? onRenderProcessResponsive(WebUri? url) {
|
||||||
return null;
|
return null;
|
||||||
@ -1106,7 +1152,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///
|
///
|
||||||
///**NOTE**: available only on Android 26+.
|
///**NOTE**: available only on Android 26+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewClient.onRenderProcessGone](https://developer.android.com/reference/android/webkit/WebViewClient#onRenderProcessGone(android.webkit.WebView,%20android.webkit.RenderProcessGoneDetail)))
|
///- Android native WebView ([Official API - WebViewClient.onRenderProcessGone](https://developer.android.com/reference/android/webkit/WebViewClient#onRenderProcessGone(android.webkit.WebView,%20android.webkit.RenderProcessGoneDetail)))
|
||||||
void onRenderProcessGone(RenderProcessGoneDetail detail) {}
|
void onRenderProcessGone(RenderProcessGoneDetail detail) {}
|
||||||
|
|
||||||
@ -1118,7 +1164,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
|
|
||||||
///As the host application if the browser should resend data as the requested page was a result of a POST. The default is to not resend the data.
|
///As the host application if the browser should resend data as the requested page was a result of a POST. The default is to not resend the data.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewClient.onFormResubmission](https://developer.android.com/reference/android/webkit/WebViewClient#onFormResubmission(android.webkit.WebView,%20android.os.Message,%20android.os.Message)))
|
///- Android native WebView ([Official API - WebViewClient.onFormResubmission](https://developer.android.com/reference/android/webkit/WebViewClient#onFormResubmission(android.webkit.WebView,%20android.os.Message,%20android.os.Message)))
|
||||||
Future<FormResubmissionAction?>? onFormResubmission(WebUri? url) {
|
Future<FormResubmissionAction?>? onFormResubmission(WebUri? url) {
|
||||||
return null;
|
return null;
|
||||||
@ -1136,7 +1182,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///
|
///
|
||||||
///[icon] represents the favicon for the current page.
|
///[icon] represents the favicon for the current page.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebChromeClient.onReceivedIcon](https://developer.android.com/reference/android/webkit/WebChromeClient#onReceivedIcon(android.webkit.WebView,%20android.graphics.Bitmap)))
|
///- Android native WebView ([Official API - WebChromeClient.onReceivedIcon](https://developer.android.com/reference/android/webkit/WebChromeClient#onReceivedIcon(android.webkit.WebView,%20android.graphics.Bitmap)))
|
||||||
void onReceivedIcon(Uint8List icon) {}
|
void onReceivedIcon(Uint8List icon) {}
|
||||||
|
|
||||||
@ -1150,7 +1196,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///
|
///
|
||||||
///[precomposed] is `true` if the url is for a precomposed touch icon.
|
///[precomposed] is `true` if the url is for a precomposed touch icon.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebChromeClient.onReceivedTouchIconUrl](https://developer.android.com/reference/android/webkit/WebChromeClient#onReceivedTouchIconUrl(android.webkit.WebView,%20java.lang.String,%20boolean)))
|
///- Android native WebView ([Official API - WebChromeClient.onReceivedTouchIconUrl](https://developer.android.com/reference/android/webkit/WebChromeClient#onReceivedTouchIconUrl(android.webkit.WebView,%20java.lang.String,%20boolean)))
|
||||||
void onReceivedTouchIconUrl(WebUri url, bool precomposed) {}
|
void onReceivedTouchIconUrl(WebUri url, bool precomposed) {}
|
||||||
|
|
||||||
@ -1171,7 +1217,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///
|
///
|
||||||
///[jsBeforeUnloadRequest] contains the message to be displayed in the alert dialog and the of the page requesting the dialog.
|
///[jsBeforeUnloadRequest] contains the message to be displayed in the alert dialog and the of the page requesting the dialog.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebChromeClient.onJsBeforeUnload](https://developer.android.com/reference/android/webkit/WebChromeClient#onJsBeforeUnload(android.webkit.WebView,%20java.lang.String,%20java.lang.String,%20android.webkit.JsResult)))
|
///- Android native WebView ([Official API - WebChromeClient.onJsBeforeUnload](https://developer.android.com/reference/android/webkit/WebChromeClient#onJsBeforeUnload(android.webkit.WebView,%20java.lang.String,%20java.lang.String,%20android.webkit.JsResult)))
|
||||||
Future<JsBeforeUnloadResponse?>? onJsBeforeUnload(
|
Future<JsBeforeUnloadResponse?>? onJsBeforeUnload(
|
||||||
JsBeforeUnloadRequest jsBeforeUnloadRequest) {
|
JsBeforeUnloadRequest jsBeforeUnloadRequest) {
|
||||||
@ -1186,7 +1232,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///
|
///
|
||||||
///[loginRequest] contains the realm, account and args of the login request.
|
///[loginRequest] contains the realm, account and args of the login request.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewClient.onReceivedLoginRequest](https://developer.android.com/reference/android/webkit/WebViewClient#onReceivedLoginRequest(android.webkit.WebView,%20java.lang.String,%20java.lang.String,%20java.lang.String)))
|
///- Android native WebView ([Official API - WebViewClient.onReceivedLoginRequest](https://developer.android.com/reference/android/webkit/WebViewClient#onReceivedLoginRequest(android.webkit.WebView,%20java.lang.String,%20java.lang.String,%20java.lang.String)))
|
||||||
void onReceivedLoginRequest(LoginRequest loginRequest) {}
|
void onReceivedLoginRequest(LoginRequest loginRequest) {}
|
||||||
|
|
||||||
@ -1198,14 +1244,14 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///
|
///
|
||||||
///**NOTE for Android**: available only on Android 21+.
|
///**NOTE for Android**: available only on Android 21+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebChromeClient.onPermissionRequestCanceled](https://developer.android.com/reference/android/webkit/WebChromeClient#onPermissionRequestCanceled(android.webkit.PermissionRequest)))
|
///- Android native WebView ([Official API - WebChromeClient.onPermissionRequestCanceled](https://developer.android.com/reference/android/webkit/WebChromeClient#onPermissionRequestCanceled(android.webkit.PermissionRequest)))
|
||||||
void onPermissionRequestCanceled(PermissionRequest permissionRequest) {}
|
void onPermissionRequestCanceled(PermissionRequest permissionRequest) {}
|
||||||
|
|
||||||
///Request display and focus for this WebView.
|
///Request display and focus for this WebView.
|
||||||
///This may happen due to another WebView opening a link in this WebView and requesting that this WebView be displayed.
|
///This may happen due to another WebView opening a link in this WebView and requesting that this WebView be displayed.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebChromeClient.onRequestFocus](https://developer.android.com/reference/android/webkit/WebChromeClient#onRequestFocus(android.webkit.WebView)))
|
///- Android native WebView ([Official API - WebChromeClient.onRequestFocus](https://developer.android.com/reference/android/webkit/WebChromeClient#onRequestFocus(android.webkit.WebView)))
|
||||||
void onRequestFocus() {}
|
void onRequestFocus() {}
|
||||||
|
|
||||||
@ -1215,7 +1261,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
|
|
||||||
///Invoked when the web view's web content process is terminated.
|
///Invoked when the web view's web content process is terminated.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - WKNavigationDelegate.webViewWebContentProcessDidTerminate](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455639-webviewwebcontentprocessdidtermi))
|
///- iOS ([Official API - WKNavigationDelegate.webViewWebContentProcessDidTerminate](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455639-webviewwebcontentprocessdidtermi))
|
||||||
///- MacOS ([Official API - WKNavigationDelegate.webViewWebContentProcessDidTerminate](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455639-webviewwebcontentprocessdidtermi))
|
///- MacOS ([Official API - WKNavigationDelegate.webViewWebContentProcessDidTerminate](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455639-webviewwebcontentprocessdidtermi))
|
||||||
void onWebContentProcessDidTerminate() {}
|
void onWebContentProcessDidTerminate() {}
|
||||||
@ -1226,7 +1272,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
|
|
||||||
///Called when a web view receives a server redirect.
|
///Called when a web view receives a server redirect.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455627-webview))
|
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455627-webview))
|
||||||
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455627-webview))
|
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455627-webview))
|
||||||
void onDidReceiveServerRedirectForProvisionalNavigation() {}
|
void onDidReceiveServerRedirectForProvisionalNavigation() {}
|
||||||
@ -1244,7 +1290,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///
|
///
|
||||||
///**NOTE**: In order to be able to listen this event, you need to set [InAppWebViewSettings.useOnNavigationResponse] setting to `true`.
|
///**NOTE**: In order to be able to listen this event, you need to set [InAppWebViewSettings.useOnNavigationResponse] setting to `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455643-webview))
|
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455643-webview))
|
||||||
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455643-webview))
|
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455643-webview))
|
||||||
Future<NavigationResponseAction?>? onNavigationResponse(
|
Future<NavigationResponseAction?>? onNavigationResponse(
|
||||||
@ -1267,7 +1313,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///
|
///
|
||||||
///**NOTE for MacOS**: available only on MacOS 11.0+.
|
///**NOTE for MacOS**: available only on MacOS 11.0+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/3601237-webview))
|
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/3601237-webview))
|
||||||
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/3601237-webview))
|
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/3601237-webview))
|
||||||
Future<ShouldAllowDeprecatedTLSAction?>? shouldAllowDeprecatedTLS(
|
Future<ShouldAllowDeprecatedTLSAction?>? shouldAllowDeprecatedTLS(
|
||||||
@ -1281,7 +1327,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///
|
///
|
||||||
///**NOTE for MacOS**: available only on MacOS 12.0+.
|
///**NOTE for MacOS**: available only on MacOS 12.0+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
void onCameraCaptureStateChanged(
|
void onCameraCaptureStateChanged(
|
||||||
@ -1296,7 +1342,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///
|
///
|
||||||
///**NOTE for MacOS**: available only on MacOS 12.0+.
|
///**NOTE for MacOS**: available only on MacOS 12.0+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
void onMicrophoneCaptureStateChanged(
|
void onMicrophoneCaptureStateChanged(
|
||||||
@ -1310,7 +1356,7 @@ abstract class PlatformInAppBrowserEvents {
|
|||||||
///
|
///
|
||||||
///[newContentSize] represents the new content size value.
|
///[newContentSize] represents the new content size value.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
void onContentSizeChanged(Size oldContentSize, Size newContentSize) {}
|
void onContentSizeChanged(Size oldContentSize, Size newContentSize) {}
|
||||||
}
|
}
|
||||||
|
@ -30,14 +30,7 @@ class DefaultInAppLocalhostServerCreationParams
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///This class allows you to create a simple server on `http://localhost:[port]/`
|
///{@macro flutter_inappwebview_platform_interface.PlatformInAppLocalhostServer}
|
||||||
///in order to be able to load your assets file on a local server.
|
|
||||||
///The default `port` value is `8080`.
|
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
///- iOS
|
|
||||||
///- MacOS
|
|
||||||
class DefaultInAppLocalhostServer extends PlatformInAppLocalhostServer {
|
class DefaultInAppLocalhostServer extends PlatformInAppLocalhostServer {
|
||||||
bool _started = false;
|
bool _started = false;
|
||||||
HttpServer? _server;
|
HttpServer? _server;
|
||||||
@ -61,30 +54,19 @@ class DefaultInAppLocalhostServer extends PlatformInAppLocalhostServer {
|
|||||||
this._shared = shared;
|
this._shared = shared;
|
||||||
}
|
}
|
||||||
|
|
||||||
///{@macro flutter_inappwebview_platform_interface.PlatformInAppLocalhostServer.port}
|
@override
|
||||||
int get port => _port;
|
int get port => _port;
|
||||||
|
|
||||||
///{@macro flutter_inappwebview_platform_interface.PlatformInAppLocalhostServer.directoryIndex}
|
@override
|
||||||
String get directoryIndex => _directoryIndex;
|
String get directoryIndex => _directoryIndex;
|
||||||
|
|
||||||
///{@macro flutter_inappwebview_platform_interface.PlatformInAppLocalhostServer.documentRoot}
|
@override
|
||||||
String get documentRoot => _documentRoot;
|
String get documentRoot => _documentRoot;
|
||||||
|
|
||||||
///{@macro flutter_inappwebview_platform_interface.PlatformInAppLocalhostServer.shared}
|
@override
|
||||||
bool get shared => _shared;
|
bool get shared => _shared;
|
||||||
|
|
||||||
///Starts the server on `http://localhost:[port]/`.
|
@override
|
||||||
///
|
|
||||||
///**NOTE for iOS**: For the iOS Platform, you need to add the `NSAllowsLocalNetworking` key with `true` in the `Info.plist` file
|
|
||||||
///(See [ATS Configuration Basics](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW35)):
|
|
||||||
///```xml
|
|
||||||
///<key>NSAppTransportSecurity</key>
|
|
||||||
///<dict>
|
|
||||||
/// <key>NSAllowsLocalNetworking</key>
|
|
||||||
/// <true/>
|
|
||||||
///</dict>
|
|
||||||
///```
|
|
||||||
///The `NSAllowsLocalNetworking` key is available since **iOS 10**.
|
|
||||||
Future<void> start() async {
|
Future<void> start() async {
|
||||||
if (this._started) {
|
if (this._started) {
|
||||||
throw Exception('Server already started on http://localhost:$_port');
|
throw Exception('Server already started on http://localhost:$_port');
|
||||||
@ -142,7 +124,7 @@ class DefaultInAppLocalhostServer extends PlatformInAppLocalhostServer {
|
|||||||
return completer.future;
|
return completer.future;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Closes the server.
|
@override
|
||||||
Future<void> close() async {
|
Future<void> close() async {
|
||||||
if (this._server == null) {
|
if (this._server == null) {
|
||||||
return;
|
return;
|
||||||
@ -153,7 +135,7 @@ class DefaultInAppLocalhostServer extends PlatformInAppLocalhostServer {
|
|||||||
this._server = null;
|
this._server = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
///Indicates if the server is running or not.
|
@override
|
||||||
bool isRunning() {
|
bool isRunning() {
|
||||||
return this._server != null;
|
return this._server != null;
|
||||||
}
|
}
|
||||||
|
@ -158,10 +158,10 @@ class AndroidInAppWebViewOptions
|
|||||||
bool hardwareAcceleration;
|
bool hardwareAcceleration;
|
||||||
|
|
||||||
///Sets whether the WebView supports multiple windows.
|
///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`.
|
///If set to `true`, [PlatformWebViewCreationParams.onCreateWindow] event must be implemented by the host application. The default value is `false`.
|
||||||
bool supportMultipleWindows;
|
bool supportMultipleWindows;
|
||||||
|
|
||||||
///Regular expression used by [WebView.shouldOverrideUrlLoading] event to cancel navigation requests for frames that are not the main frame.
|
///Regular expression used by [PlatformWebViewCreationParams.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.
|
///If the url request of a subframe matches the regular expression, then the request of that subframe is canceled.
|
||||||
String? regexToCancelSubFramesLoading;
|
String? regexToCancelSubFramesLoading;
|
||||||
|
|
||||||
@ -172,10 +172,10 @@ class AndroidInAppWebViewOptions
|
|||||||
///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)).
|
///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;
|
bool useHybridComposition;
|
||||||
|
|
||||||
///Set to `true` to be able to listen at the [WebView.androidShouldInterceptRequest] event. The default value is `false`.
|
///Set to `true` to be able to listen at the [PlatformWebViewCreationParams.androidShouldInterceptRequest] event. The default value is `false`.
|
||||||
bool useShouldInterceptRequest;
|
bool useShouldInterceptRequest;
|
||||||
|
|
||||||
///Set to `true` to be able to listen at the [WebView.androidOnRenderProcessGone] event. The default value is `false`.
|
///Set to `true` to be able to listen at the [PlatformWebViewCreationParams.androidOnRenderProcessGone] event. The default value is `false`.
|
||||||
bool useOnRenderProcessGone;
|
bool useOnRenderProcessGone;
|
||||||
|
|
||||||
///Sets the WebView's over-scroll mode.
|
///Sets the WebView's over-scroll mode.
|
||||||
|
@ -152,7 +152,7 @@ class IOSInAppWebViewOptions
|
|||||||
///**NOTE**: available on iOS 14.0+.
|
///**NOTE**: available on iOS 14.0+.
|
||||||
bool limitsNavigationsToAppBoundDomains;
|
bool limitsNavigationsToAppBoundDomains;
|
||||||
|
|
||||||
///Set to `true` to be able to listen to the [WebView.iosOnNavigationResponse] event. The default value is `false`.
|
///Set to `true` to be able to listen to the [PlatformWebViewCreationParams.iosOnNavigationResponse] event. The default value is `false`.
|
||||||
bool useOnNavigationResponse;
|
bool useOnNavigationResponse;
|
||||||
|
|
||||||
///Set to `true` to enable Apple Pay API for the `WebView` at its first page load or on the next page load (using [PlatformInAppWebViewController.setOptions]). The default value is `false`.
|
///Set to `true` to enable Apple Pay API for the `WebView` at its first page load or on the next page load (using [PlatformInAppWebViewController.setOptions]). The default value is `false`.
|
||||||
@ -187,7 +187,7 @@ class IOSInAppWebViewOptions
|
|||||||
///- [PlatformInAppWebViewController.addWebMessageListener]
|
///- [PlatformInAppWebViewController.addWebMessageListener]
|
||||||
///
|
///
|
||||||
///Options affected:
|
///Options affected:
|
||||||
///- [WebView.initialUserScripts]
|
///- [PlatformWebViewCreationParams.initialUserScripts]
|
||||||
///- [InAppWebViewOptions.supportZoom]
|
///- [InAppWebViewOptions.supportZoom]
|
||||||
///- [InAppWebViewOptions.useOnLoadResource]
|
///- [InAppWebViewOptions.useOnLoadResource]
|
||||||
///- [InAppWebViewOptions.useShouldInterceptAjaxRequest]
|
///- [InAppWebViewOptions.useShouldInterceptAjaxRequest]
|
||||||
@ -195,26 +195,26 @@ class IOSInAppWebViewOptions
|
|||||||
///- [IOSInAppWebViewOptions.enableViewportScale]
|
///- [IOSInAppWebViewOptions.enableViewportScale]
|
||||||
///
|
///
|
||||||
///Events affected:
|
///Events affected:
|
||||||
///- the `hitTestResult` argument of [WebView.onLongPressHitTestResult] will be empty
|
///- the `hitTestResult` argument of [PlatformWebViewCreationParams.onLongPressHitTestResult] will be empty
|
||||||
///- the `hitTestResult` argument of [ContextMenu.onCreateContextMenu] will be empty
|
///- the `hitTestResult` argument of [ContextMenu.onCreateContextMenu] will be empty
|
||||||
///- [WebView.onLoadResource]
|
///- [PlatformWebViewCreationParams.onLoadResource]
|
||||||
///- [WebView.shouldInterceptAjaxRequest]
|
///- [PlatformWebViewCreationParams.shouldInterceptAjaxRequest]
|
||||||
///- [WebView.onAjaxReadyStateChange]
|
///- [PlatformWebViewCreationParams.onAjaxReadyStateChange]
|
||||||
///- [WebView.onAjaxProgress]
|
///- [PlatformWebViewCreationParams.onAjaxProgress]
|
||||||
///- [WebView.shouldInterceptFetchRequest]
|
///- [PlatformWebViewCreationParams.shouldInterceptFetchRequest]
|
||||||
///- [WebView.onConsoleMessage]
|
///- [PlatformWebViewCreationParams.onConsoleMessage]
|
||||||
///- [WebView.onPrint]
|
///- [PlatformWebViewCreationParams.onPrint]
|
||||||
///- [WebView.onWindowFocus]
|
///- [PlatformWebViewCreationParams.onWindowFocus]
|
||||||
///- [WebView.onWindowBlur]
|
///- [PlatformWebViewCreationParams.onWindowBlur]
|
||||||
///- [WebView.onFindResultReceived]
|
///- [PlatformWebViewCreationParams.onFindResultReceived]
|
||||||
///
|
///
|
||||||
///**NOTE**: available on iOS 13.0+.
|
///**NOTE**: available on iOS 13.0+.
|
||||||
bool applePayAPIEnabled;
|
bool applePayAPIEnabled;
|
||||||
|
|
||||||
///Used in combination with [WebView.initialUrlRequest] or [WebView.initialData] (using the `file://` scheme), it represents the URL from which to read the web content.
|
///Used in combination with [PlatformWebViewCreationParams.initialUrlRequest] or [PlatformWebViewCreationParams.initialData] (using the `file://` scheme), it represents the URL from which to read the web content.
|
||||||
///This URL must be a file-based URL (using the `file://` scheme).
|
///This URL must be a file-based URL (using the `file://` scheme).
|
||||||
///Specify the same value as the [URLRequest.url] if you are using it with the [WebView.initialUrlRequest] parameter or
|
///Specify the same value as the [URLRequest.url] if you are using it with the [PlatformWebViewCreationParams.initialUrlRequest] parameter or
|
||||||
///the [InAppWebViewInitialData.baseUrl] if you are using it with the [WebView.initialData] parameter to prevent WebView from reading any other content.
|
///the [InAppWebViewInitialData.baseUrl] if you are using it with the [PlatformWebViewCreationParams.initialData] parameter to prevent WebView from reading any other content.
|
||||||
///Specify a directory to give WebView permission to read additional files in the specified directory.
|
///Specify a directory to give WebView permission to read additional files in the specified directory.
|
||||||
Uri? allowingReadAccessTo;
|
Uri? allowingReadAccessTo;
|
||||||
|
|
||||||
|
@ -32,6 +32,7 @@ import '../platform_webview_feature.dart';
|
|||||||
import '../in_app_webview/platform_inappwebview_controller.dart';
|
import '../in_app_webview/platform_inappwebview_controller.dart';
|
||||||
import '../context_menu/context_menu.dart';
|
import '../context_menu/context_menu.dart';
|
||||||
import '../in_app_browser/platform_in_app_browser.dart';
|
import '../in_app_browser/platform_in_app_browser.dart';
|
||||||
|
import 'platform_webview.dart';
|
||||||
|
|
||||||
part 'in_app_webview_settings.g.dart';
|
part 'in_app_webview_settings.g.dart';
|
||||||
|
|
||||||
@ -51,27 +52,27 @@ List<ContentBlocker> _deserializeContentBlockers(
|
|||||||
///This class represents all the WebView settings available.
|
///This class represents all the WebView settings available.
|
||||||
@ExchangeableObject(copyMethod: true)
|
@ExchangeableObject(copyMethod: true)
|
||||||
class InAppWebViewSettings_ {
|
class InAppWebViewSettings_ {
|
||||||
///Set to `true` to be able to listen at the [WebView.shouldOverrideUrlLoading] event.
|
///Set to `true` to be able to listen at the [PlatformWebViewCreationParams.shouldOverrideUrlLoading] event.
|
||||||
///
|
///
|
||||||
///If the [WebView.shouldOverrideUrlLoading] event is implemented and this value is `null`,
|
///If the [PlatformWebViewCreationParams.shouldOverrideUrlLoading] event is implemented and this value is `null`,
|
||||||
///it will be automatically inferred as `true`, otherwise, the default value is `false`.
|
///it will be automatically inferred as `true`, otherwise, the default value is `false`.
|
||||||
///This logic will not be applied for [PlatformInAppBrowser], where you must set the value manually.
|
///This logic will not be applied for [PlatformInAppBrowser], where you must set the value manually.
|
||||||
@SupportedPlatforms(
|
@SupportedPlatforms(
|
||||||
platforms: [AndroidPlatform(), IOSPlatform(), MacOSPlatform()])
|
platforms: [AndroidPlatform(), IOSPlatform(), MacOSPlatform()])
|
||||||
bool? useShouldOverrideUrlLoading;
|
bool? useShouldOverrideUrlLoading;
|
||||||
|
|
||||||
///Set to `true` to be able to listen at the [WebView.onLoadResource] event.
|
///Set to `true` to be able to listen at the [PlatformWebViewCreationParams.onLoadResource] event.
|
||||||
///
|
///
|
||||||
///If the [WebView.onLoadResource] event is implemented and this value is `null`,
|
///If the [PlatformWebViewCreationParams.onLoadResource] event is implemented and this value is `null`,
|
||||||
///it will be automatically inferred as `true`, otherwise, the default value is `false`.
|
///it will be automatically inferred as `true`, otherwise, the default value is `false`.
|
||||||
///This logic will not be applied for [PlatformInAppBrowser], where you must set the value manually.
|
///This logic will not be applied for [PlatformInAppBrowser], where you must set the value manually.
|
||||||
@SupportedPlatforms(
|
@SupportedPlatforms(
|
||||||
platforms: [AndroidPlatform(), IOSPlatform(), MacOSPlatform()])
|
platforms: [AndroidPlatform(), IOSPlatform(), MacOSPlatform()])
|
||||||
bool? useOnLoadResource;
|
bool? useOnLoadResource;
|
||||||
|
|
||||||
///Set to `true` to be able to listen at the [WebView.onDownloadStartRequest] event.
|
///Set to `true` to be able to listen at the [PlatformWebViewCreationParams.onDownloadStartRequest] event.
|
||||||
///
|
///
|
||||||
///If the [WebView.onDownloadStartRequest] event is implemented and this value is `null`,
|
///If the [PlatformWebViewCreationParams.onDownloadStartRequest] event is implemented and this value is `null`,
|
||||||
///it will be automatically inferred as `true`, otherwise, the default value is `false`.
|
///it will be automatically inferred as `true`, otherwise, the default value is `false`.
|
||||||
///This logic will not be applied for [PlatformInAppBrowser], where you must set the value manually.
|
///This logic will not be applied for [PlatformInAppBrowser], where you must set the value manually.
|
||||||
@SupportedPlatforms(
|
@SupportedPlatforms(
|
||||||
@ -219,7 +220,7 @@ class InAppWebViewSettings_ {
|
|||||||
])
|
])
|
||||||
bool? horizontalScrollBarEnabled;
|
bool? horizontalScrollBarEnabled;
|
||||||
|
|
||||||
///List of custom schemes that the WebView must handle. Use the [WebView.onLoadResourceWithCustomScheme] event to intercept resource requests with custom scheme.
|
///List of custom schemes that the WebView must handle. Use the [PlatformWebViewCreationParams.onLoadResourceWithCustomScheme] event to intercept resource requests with custom scheme.
|
||||||
@SupportedPlatforms(platforms: [
|
@SupportedPlatforms(platforms: [
|
||||||
AndroidPlatform(),
|
AndroidPlatform(),
|
||||||
IOSPlatform(available: "11.0"),
|
IOSPlatform(available: "11.0"),
|
||||||
@ -252,18 +253,18 @@ class InAppWebViewSettings_ {
|
|||||||
])
|
])
|
||||||
UserPreferredContentMode_? preferredContentMode;
|
UserPreferredContentMode_? preferredContentMode;
|
||||||
|
|
||||||
///Set to `true` to be able to listen at the [WebView.shouldInterceptAjaxRequest] event.
|
///Set to `true` to be able to listen at the [PlatformWebViewCreationParams.shouldInterceptAjaxRequest] event.
|
||||||
///
|
///
|
||||||
///If the [WebView.shouldInterceptAjaxRequest] event is implemented and this value is `null`,
|
///If the [PlatformWebViewCreationParams.shouldInterceptAjaxRequest] event is implemented and this value is `null`,
|
||||||
///it will be automatically inferred as `true`, otherwise, the default value is `false`.
|
///it will be automatically inferred as `true`, otherwise, the default value is `false`.
|
||||||
///This logic will not be applied for [PlatformInAppBrowser], where you must set the value manually.
|
///This logic will not be applied for [PlatformInAppBrowser], where you must set the value manually.
|
||||||
@SupportedPlatforms(
|
@SupportedPlatforms(
|
||||||
platforms: [AndroidPlatform(), IOSPlatform(), MacOSPlatform()])
|
platforms: [AndroidPlatform(), IOSPlatform(), MacOSPlatform()])
|
||||||
bool? useShouldInterceptAjaxRequest;
|
bool? useShouldInterceptAjaxRequest;
|
||||||
|
|
||||||
///Set to `true` to be able to listen at the [WebView.shouldInterceptFetchRequest] event.
|
///Set to `true` to be able to listen at the [PlatformWebViewCreationParams.shouldInterceptFetchRequest] event.
|
||||||
///
|
///
|
||||||
///If the [WebView.shouldInterceptFetchRequest] event is implemented and this value is `null`,
|
///If the [PlatformWebViewCreationParams.shouldInterceptFetchRequest] event is implemented and this value is `null`,
|
||||||
///it will be automatically inferred as `true`, otherwise, the default value is `false`.
|
///it will be automatically inferred as `true`, otherwise, the default value is `false`.
|
||||||
///This logic will not be applied for [PlatformInAppBrowser], where you must set the value manually.
|
///This logic will not be applied for [PlatformInAppBrowser], where you must set the value manually.
|
||||||
@SupportedPlatforms(
|
@SupportedPlatforms(
|
||||||
@ -605,7 +606,7 @@ because there isn't any way to make the website data store non-persistent for th
|
|||||||
note:
|
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:
|
"""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 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.""")
|
- an application must provide an implementation of the [PlatformWebViewCreationParams.onGeolocationPermissionsShowPrompt] callback to receive notifications that a page is requesting access to location via the JavaScript Geolocation API.""")
|
||||||
])
|
])
|
||||||
bool? geolocationEnabled;
|
bool? geolocationEnabled;
|
||||||
|
|
||||||
@ -745,7 +746,7 @@ because there isn't any way to make the website data store non-persistent for th
|
|||||||
bool? hardwareAcceleration;
|
bool? hardwareAcceleration;
|
||||||
|
|
||||||
///Sets whether the WebView supports multiple windows.
|
///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`.
|
///If set to `true`, [PlatformWebViewCreationParams.onCreateWindow] event must be implemented by the host application. The default value is `false`.
|
||||||
@SupportedPlatforms(platforms: [
|
@SupportedPlatforms(platforms: [
|
||||||
AndroidPlatform(
|
AndroidPlatform(
|
||||||
apiName: "WebSettings.setSupportMultipleWindows",
|
apiName: "WebSettings.setSupportMultipleWindows",
|
||||||
@ -754,7 +755,7 @@ because there isn't any way to make the website data store non-persistent for th
|
|||||||
])
|
])
|
||||||
bool? supportMultipleWindows;
|
bool? supportMultipleWindows;
|
||||||
|
|
||||||
///Regular expression used by [WebView.shouldOverrideUrlLoading] event to cancel navigation requests for frames that are not the main frame.
|
///Regular expression used by [PlatformWebViewCreationParams.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.
|
///If the url request of a subframe matches the regular expression, then the request of that subframe is canceled.
|
||||||
@SupportedPlatforms(platforms: [AndroidPlatform()])
|
@SupportedPlatforms(platforms: [AndroidPlatform()])
|
||||||
String? regexToCancelSubFramesLoading;
|
String? regexToCancelSubFramesLoading;
|
||||||
@ -769,17 +770,17 @@ as it can cause framerate drops on animations in Android 9 and lower (see [Hybri
|
|||||||
])
|
])
|
||||||
bool? useHybridComposition;
|
bool? useHybridComposition;
|
||||||
|
|
||||||
///Set to `true` to be able to listen at the [WebView.shouldInterceptRequest] event.
|
///Set to `true` to be able to listen at the [PlatformWebViewCreationParams.shouldInterceptRequest] event.
|
||||||
///
|
///
|
||||||
///If the [WebView.shouldInterceptRequest] event is implemented and this value is `null`,
|
///If the [PlatformWebViewCreationParams.shouldInterceptRequest] event is implemented and this value is `null`,
|
||||||
///it will be automatically inferred as `true`, otherwise, the default value is `false`.
|
///it will be automatically inferred as `true`, otherwise, the default value is `false`.
|
||||||
///This logic will not be applied for [PlatformInAppBrowser], where you must set the value manually.
|
///This logic will not be applied for [PlatformInAppBrowser], where you must set the value manually.
|
||||||
@SupportedPlatforms(platforms: [AndroidPlatform()])
|
@SupportedPlatforms(platforms: [AndroidPlatform()])
|
||||||
bool? useShouldInterceptRequest;
|
bool? useShouldInterceptRequest;
|
||||||
|
|
||||||
///Set to `true` to be able to listen at the [WebView.onRenderProcessGone] event.
|
///Set to `true` to be able to listen at the [PlatformWebViewCreationParams.onRenderProcessGone] event.
|
||||||
///
|
///
|
||||||
///If the [WebView.onRenderProcessGone] event is implemented and this value is `null`,
|
///If the [PlatformWebViewCreationParams.onRenderProcessGone] event is implemented and this value is `null`,
|
||||||
///it will be automatically inferred as `true`, otherwise, the default value is `false`.
|
///it will be automatically inferred as `true`, otherwise, the default value is `false`.
|
||||||
///This logic will not be applied for [PlatformInAppBrowser], where you must set the value manually.
|
///This logic will not be applied for [PlatformInAppBrowser], where you must set the value manually.
|
||||||
@SupportedPlatforms(platforms: [AndroidPlatform()])
|
@SupportedPlatforms(platforms: [AndroidPlatform()])
|
||||||
@ -1288,9 +1289,9 @@ as it can cause framerate drops on animations in Android 9 and lower (see [Hybri
|
|||||||
])
|
])
|
||||||
bool? limitsNavigationsToAppBoundDomains;
|
bool? limitsNavigationsToAppBoundDomains;
|
||||||
|
|
||||||
///Set to `true` to be able to listen to the [WebView.onNavigationResponse] event.
|
///Set to `true` to be able to listen to the [PlatformWebViewCreationParams.onNavigationResponse] event.
|
||||||
///
|
///
|
||||||
///If the [WebView.onNavigationResponse] event is implemented and this value is `null`,
|
///If the [PlatformWebViewCreationParams.onNavigationResponse] event is implemented and this value is `null`,
|
||||||
///it will be automatically inferred as `true`, otherwise, the default value is `false`.
|
///it will be automatically inferred as `true`, otherwise, the default value is `false`.
|
||||||
///This logic will not be applied for [PlatformInAppBrowser], where you must set the value manually.
|
///This logic will not be applied for [PlatformInAppBrowser], where you must set the value manually.
|
||||||
@SupportedPlatforms(platforms: [IOSPlatform(), MacOSPlatform()])
|
@SupportedPlatforms(platforms: [IOSPlatform(), MacOSPlatform()])
|
||||||
@ -1338,7 +1339,7 @@ as it can cause framerate drops on animations in Android 9 and lower (see [Hybri
|
|||||||
///- [PlatformInAppWebViewController.canScrollHorizontally]
|
///- [PlatformInAppWebViewController.canScrollHorizontally]
|
||||||
///
|
///
|
||||||
///Settings affected:
|
///Settings affected:
|
||||||
///- [WebView.initialUserScripts]
|
///- [PlatformWebViewCreationParams.initialUserScripts]
|
||||||
///- [InAppWebViewSettings.supportZoom]
|
///- [InAppWebViewSettings.supportZoom]
|
||||||
///- [InAppWebViewSettings.useOnLoadResource]
|
///- [InAppWebViewSettings.useOnLoadResource]
|
||||||
///- [InAppWebViewSettings.useShouldInterceptAjaxRequest]
|
///- [InAppWebViewSettings.useShouldInterceptAjaxRequest]
|
||||||
@ -1346,32 +1347,32 @@ as it can cause framerate drops on animations in Android 9 and lower (see [Hybri
|
|||||||
///- [InAppWebViewSettings.enableViewportScale]
|
///- [InAppWebViewSettings.enableViewportScale]
|
||||||
///
|
///
|
||||||
///Events affected:
|
///Events affected:
|
||||||
///- the `hitTestResult` argument of [WebView.onLongPressHitTestResult] will be empty
|
///- the `hitTestResult` argument of [PlatformWebViewCreationParams.onLongPressHitTestResult] will be empty
|
||||||
///- the `hitTestResult` argument of [ContextMenu.onCreateContextMenu] will be empty
|
///- the `hitTestResult` argument of [ContextMenu.onCreateContextMenu] will be empty
|
||||||
///- [WebView.onLoadResource]
|
///- [PlatformWebViewCreationParams.onLoadResource]
|
||||||
///- [WebView.shouldInterceptAjaxRequest]
|
///- [PlatformWebViewCreationParams.shouldInterceptAjaxRequest]
|
||||||
///- [WebView.onAjaxReadyStateChange]
|
///- [PlatformWebViewCreationParams.onAjaxReadyStateChange]
|
||||||
///- [WebView.onAjaxProgress]
|
///- [PlatformWebViewCreationParams.onAjaxProgress]
|
||||||
///- [WebView.shouldInterceptFetchRequest]
|
///- [PlatformWebViewCreationParams.shouldInterceptFetchRequest]
|
||||||
///- [WebView.onConsoleMessage]
|
///- [PlatformWebViewCreationParams.onConsoleMessage]
|
||||||
///- [WebView.onPrintRequest]
|
///- [PlatformWebViewCreationParams.onPrintRequest]
|
||||||
///- [WebView.onWindowFocus]
|
///- [PlatformWebViewCreationParams.onWindowFocus]
|
||||||
///- [WebView.onWindowBlur]
|
///- [PlatformWebViewCreationParams.onWindowBlur]
|
||||||
///- [WebView.onFindResultReceived]
|
///- [PlatformWebViewCreationParams.onFindResultReceived]
|
||||||
///- [FindInteractionController.onFindResultReceived]
|
///- [FindInteractionController.onFindResultReceived]
|
||||||
///
|
///
|
||||||
///Also, on MacOS:
|
///Also, on MacOS:
|
||||||
///- [WebView.onScrollChanged]
|
///- [PlatformWebViewCreationParams.onScrollChanged]
|
||||||
@SupportedPlatforms(platforms: [
|
@SupportedPlatforms(platforms: [
|
||||||
IOSPlatform(available: "13.0"),
|
IOSPlatform(available: "13.0"),
|
||||||
MacOSPlatform(available: "10.15")
|
MacOSPlatform(available: "10.15")
|
||||||
])
|
])
|
||||||
bool? applePayAPIEnabled;
|
bool? applePayAPIEnabled;
|
||||||
|
|
||||||
///Used in combination with [WebView.initialUrlRequest] or [WebView.initialData] (using the `file://` scheme), it represents the URL from which to read the web content.
|
///Used in combination with [PlatformWebViewCreationParams.initialUrlRequest] or [PlatformWebViewCreationParams.initialData] (using the `file://` scheme), it represents the URL from which to read the web content.
|
||||||
///This URL must be a file-based URL (using the `file://` scheme).
|
///This URL must be a file-based URL (using the `file://` scheme).
|
||||||
///Specify the same value as the [URLRequest.url] if you are using it with the [WebView.initialUrlRequest] parameter or
|
///Specify the same value as the [URLRequest.url] if you are using it with the [PlatformWebViewCreationParams.initialUrlRequest] parameter or
|
||||||
///the [InAppWebViewInitialData.baseUrl] if you are using it with the [WebView.initialData] parameter to prevent WebView from reading any other content.
|
///the [InAppWebViewInitialData.baseUrl] if you are using it with the [PlatformWebViewCreationParams.initialData] parameter to prevent WebView from reading any other content.
|
||||||
///Specify a directory to give WebView permission to read additional files in the specified directory.
|
///Specify a directory to give WebView permission to read additional files in the specified directory.
|
||||||
@SupportedPlatforms(platforms: [IOSPlatform(), MacOSPlatform()])
|
@SupportedPlatforms(platforms: [IOSPlatform(), MacOSPlatform()])
|
||||||
WebUri? allowingReadAccessTo;
|
WebUri? allowingReadAccessTo;
|
||||||
@ -1854,13 +1855,13 @@ class WebViewOptions {
|
|||||||
@Deprecated('Use InAppWebViewSettings instead')
|
@Deprecated('Use InAppWebViewSettings instead')
|
||||||
class InAppWebViewOptions
|
class InAppWebViewOptions
|
||||||
implements WebViewOptions, BrowserOptions, AndroidOptions, IosOptions {
|
implements WebViewOptions, BrowserOptions, AndroidOptions, IosOptions {
|
||||||
///Set to `true` to be able to listen at the [WebView.shouldOverrideUrlLoading] event. The default value is `false`.
|
///Set to `true` to be able to listen at the [PlatformWebViewCreationParams.shouldOverrideUrlLoading] event. The default value is `false`.
|
||||||
bool useShouldOverrideUrlLoading;
|
bool useShouldOverrideUrlLoading;
|
||||||
|
|
||||||
///Set to `true` to be able to listen at the [WebView.onLoadResource] event. The default value is `false`.
|
///Set to `true` to be able to listen at the [PlatformWebViewCreationParams.onLoadResource] event. The default value is `false`.
|
||||||
bool useOnLoadResource;
|
bool useOnLoadResource;
|
||||||
|
|
||||||
///Set to `true` to be able to listen at the [WebView.onDownloadStart] event. The default value is `false`.
|
///Set to `true` to be able to listen at the [PlatformWebViewCreationParams.onDownloadStart] event. The default value is `false`.
|
||||||
bool useOnDownloadStart;
|
bool useOnDownloadStart;
|
||||||
|
|
||||||
///Set to `true` to have all the browser's cache cleared before the new WebView is opened. The default value is `false`.
|
///Set to `true` to have all the browser's cache cleared before the new WebView is opened. The default value is `false`.
|
||||||
@ -1896,7 +1897,7 @@ class InAppWebViewOptions
|
|||||||
///Define whether the horizontal scrollbar should be drawn or not. The default value is `true`.
|
///Define whether the horizontal scrollbar should be drawn or not. The default value is `true`.
|
||||||
bool horizontalScrollBarEnabled;
|
bool horizontalScrollBarEnabled;
|
||||||
|
|
||||||
///List of custom schemes that the WebView must handle. Use the [WebView.onLoadResourceCustomScheme] event to intercept resource requests with custom scheme.
|
///List of custom schemes that the WebView must handle. Use the [PlatformWebViewCreationParams.onLoadResourceCustomScheme] event to intercept resource requests with custom scheme.
|
||||||
///
|
///
|
||||||
///**NOTE**: available on iOS 11.0+.
|
///**NOTE**: available on iOS 11.0+.
|
||||||
List<String> resourceCustomSchemes;
|
List<String> resourceCustomSchemes;
|
||||||
@ -1911,10 +1912,10 @@ class InAppWebViewOptions
|
|||||||
///**NOTE**: available on iOS 13.0+.
|
///**NOTE**: available on iOS 13.0+.
|
||||||
UserPreferredContentMode? preferredContentMode;
|
UserPreferredContentMode? preferredContentMode;
|
||||||
|
|
||||||
///Set to `true` to be able to listen at the [WebView.shouldInterceptAjaxRequest] event. The default value is `false`.
|
///Set to `true` to be able to listen at the [PlatformWebViewCreationParams.shouldInterceptAjaxRequest] event. The default value is `false`.
|
||||||
bool useShouldInterceptAjaxRequest;
|
bool useShouldInterceptAjaxRequest;
|
||||||
|
|
||||||
///Set to `true` to be able to listen at the [WebView.shouldInterceptFetchRequest] event. The default value is `false`.
|
///Set to `true` to be able to listen at the [PlatformWebViewCreationParams.shouldInterceptFetchRequest] event. The default value is `false`.
|
||||||
bool useShouldInterceptFetchRequest;
|
bool useShouldInterceptFetchRequest;
|
||||||
|
|
||||||
///Set to `true` to open a browser window with incognito mode. The default value is `false`.
|
///Set to `true` to open a browser window with incognito mode. The default value is `false`.
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -135,7 +135,7 @@ class PlatformHeadlessInAppWebViewCreationParams
|
|||||||
///
|
///
|
||||||
///**NOTE for Android**: `Size` width and height values will be converted to `int` values because they cannot have `double` values.
|
///**NOTE for Android**: `Size` width and height values will be converted to `int` values because they cannot have `double` values.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- Web
|
///- Web
|
||||||
@ -143,13 +143,13 @@ class PlatformHeadlessInAppWebViewCreationParams
|
|||||||
final Size initialSize;
|
final Size initialSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
///{@template flutter_inappwebview.HeadlessInAppWebView}
|
///{@template flutter_inappwebview_platform_interface.PlatformHeadlessInAppWebView}
|
||||||
///Class that represents a WebView in headless mode.
|
///Class that represents a WebView in headless mode.
|
||||||
///It can be used to run a WebView in background without attaching an `InAppWebView` to the widget tree.
|
///It can be used to run a WebView in background without attaching an `InAppWebView` to the widget tree.
|
||||||
///
|
///
|
||||||
///**NOTE**: Remember to dispose it when you don't need it anymore.
|
///**NOTE**: Remember to dispose it when you don't need it anymore.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- Web
|
///- Web
|
||||||
@ -187,40 +187,49 @@ abstract class PlatformHeadlessInAppWebView extends PlatformInterface
|
|||||||
/// The parameters used to initialize the [PlatformHeadlessInAppWebView].
|
/// The parameters used to initialize the [PlatformHeadlessInAppWebView].
|
||||||
final PlatformHeadlessInAppWebViewCreationParams params;
|
final PlatformHeadlessInAppWebViewCreationParams params;
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformHeadlessInAppWebView.id}
|
||||||
|
///View ID.
|
||||||
|
///{@endtemplate}
|
||||||
|
String get id =>
|
||||||
|
throw UnimplementedError('id is not implemented on the current platform');
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformHeadlessInAppWebView.webViewController}
|
||||||
///WebView Controller that can be used to access the [InAppWebViewController] API.
|
///WebView Controller that can be used to access the [InAppWebViewController] API.
|
||||||
|
///{@endtemplate}
|
||||||
PlatformInAppWebViewController? get webViewController =>
|
PlatformInAppWebViewController? get webViewController =>
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'webViewController is not implemented on the current platform');
|
'webViewController is not implemented on the current platform');
|
||||||
|
|
||||||
///View ID.
|
///{@template flutter_inappwebview_platform_interface.PlatformHeadlessInAppWebView.run}
|
||||||
String get id =>
|
|
||||||
throw UnimplementedError('id is not implemented on the current platform');
|
|
||||||
|
|
||||||
///Runs the headless WebView.
|
///Runs the headless WebView.
|
||||||
///
|
///
|
||||||
///**NOTE for Web**: it will append a new `iframe` to the body.
|
///**NOTE for Web**: it will append a new `iframe` to the body.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- Web
|
///- Web
|
||||||
///- MacOS
|
///- MacOS
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> run() {
|
Future<void> run() {
|
||||||
throw UnimplementedError('run is not implemented on the current platform');
|
throw UnimplementedError('run is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformHeadlessInAppWebView.isRunning}
|
||||||
///Indicates if the headless WebView is running or not.
|
///Indicates if the headless WebView is running or not.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- Web
|
///- Web
|
||||||
///- MacOS
|
///- MacOS
|
||||||
|
///{@endtemplate}
|
||||||
bool isRunning() {
|
bool isRunning() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'isRunning is not implemented on the current platform');
|
'isRunning is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformHeadlessInAppWebView.setSize}
|
||||||
///Set the size of the WebView in pixels.
|
///Set the size of the WebView in pixels.
|
||||||
///
|
///
|
||||||
///Set `-1` to match the corresponding width or height of the current device screen size.
|
///Set `-1` to match the corresponding width or height of the current device screen size.
|
||||||
@ -230,37 +239,42 @@ abstract class PlatformHeadlessInAppWebView extends PlatformInterface
|
|||||||
///
|
///
|
||||||
///**NOTE for Android**: `Size` width and height values will be converted to `int` values because they cannot have `double` values.
|
///**NOTE for Android**: `Size` width and height values will be converted to `int` values because they cannot have `double` values.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- Web
|
///- Web
|
||||||
///- MacOS
|
///- MacOS
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> setSize(Size size) {
|
Future<void> setSize(Size size) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'setSize is not implemented on the current platform');
|
'setSize is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformHeadlessInAppWebView.getSize}
|
||||||
///Gets the current size in pixels of the WebView.
|
///Gets the current size in pixels of the WebView.
|
||||||
///
|
///
|
||||||
///Note that if the [PlatformHeadlessInAppWebView] is not running, this method will return `null`.
|
///Note that if the [PlatformHeadlessInAppWebView] is not running, this method will return `null`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- Web
|
///- Web
|
||||||
///- MacOS
|
///- MacOS
|
||||||
|
///{@endtemplate}
|
||||||
Future<Size?> getSize() {
|
Future<Size?> getSize() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'getSize is not implemented on the current platform');
|
'getSize is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformHeadlessInAppWebView.dispose}
|
||||||
///Disposes the headless WebView.
|
///Disposes the headless WebView.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- Web
|
///- Web
|
||||||
///- MacOS
|
///- MacOS
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> dispose() {
|
Future<void> dispose() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'dispose is not implemented on the current platform');
|
'dispose is not implemented on the current platform');
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -160,7 +160,7 @@ class PlatformInAppWebViewWidgetCreationParams
|
|||||||
|
|
||||||
///The [PlatformHeadlessInAppWebView] to use to initialize this widget.
|
///The [PlatformHeadlessInAppWebView] to use to initialize this widget.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- Web
|
///- Web
|
||||||
@ -170,7 +170,7 @@ class PlatformInAppWebViewWidgetCreationParams
|
|||||||
///Remember to dispose the [InAppWebViewKeepAlive] instance
|
///Remember to dispose the [InAppWebViewKeepAlive] instance
|
||||||
///using [InAppWebViewController.disposeKeepAlive].
|
///using [InAppWebViewController.disposeKeepAlive].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
final InAppWebViewKeepAlive? keepAlive;
|
final InAppWebViewKeepAlive? keepAlive;
|
||||||
@ -178,12 +178,21 @@ class PlatformInAppWebViewWidgetCreationParams
|
|||||||
///Used to prevent gesture delay on iOS caused by Flutter's gestures handling
|
///Used to prevent gesture delay on iOS caused by Flutter's gestures handling
|
||||||
///between native/platform views.
|
///between native/platform views.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
final bool? preventGestureDelay;
|
final bool? preventGestureDelay;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Interface for a platform implementation of a web view widget.
|
/// Interface for a platform implementation of a web view widget.
|
||||||
|
///
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformInAppWebViewWidget}
|
||||||
|
///Flutter Widget for adding an **inline native WebView** integrated in the flutter widget tree.
|
||||||
|
///
|
||||||
|
///**Officially Supported Platforms/Implementations**:
|
||||||
|
///- Android native WebView
|
||||||
|
///- iOS
|
||||||
|
///- Web
|
||||||
|
///{@endtemplate}
|
||||||
abstract class PlatformInAppWebViewWidget extends PlatformInterface
|
abstract class PlatformInAppWebViewWidget extends PlatformInterface
|
||||||
implements Disposable {
|
implements Disposable {
|
||||||
/// Creates a new [PlatformInAppWebViewWidget]
|
/// Creates a new [PlatformInAppWebViewWidget]
|
||||||
@ -220,6 +229,7 @@ abstract class PlatformInAppWebViewWidget extends PlatformInterface
|
|||||||
/// Returns a Widget tree that embeds the created web view.
|
/// Returns a Widget tree that embeds the created web view.
|
||||||
Widget build(BuildContext context);
|
Widget build(BuildContext context);
|
||||||
|
|
||||||
|
/// Gets the `InAppWebViewController` instance controller
|
||||||
T controllerFromPlatform<T>(PlatformInAppWebViewController controller);
|
T controllerFromPlatform<T>(PlatformInAppWebViewController controller);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -13,27 +13,27 @@ import 'in_app_webview_settings.dart';
|
|||||||
import 'platform_inappwebview_controller.dart';
|
import 'platform_inappwebview_controller.dart';
|
||||||
import '../print_job/main.dart';
|
import '../print_job/main.dart';
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams}
|
||||||
///Class that represents a WebView. Used by [InAppWebView], [HeadlessInAppWebView] and the WebView of [PlatformInAppBrowser].
|
///Class that represents a WebView. Used by [InAppWebView], [HeadlessInAppWebView] and the WebView of [PlatformInAppBrowser].
|
||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
class PlatformWebViewCreationParams<T> {
|
class PlatformWebViewCreationParams<T> {
|
||||||
final T Function(PlatformInAppWebViewController controller)?
|
final T Function(PlatformInAppWebViewController controller)?
|
||||||
controllerFromPlatform;
|
controllerFromPlatform;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.windowId}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.windowId}
|
||||||
///The window id of a [CreateWindowAction.windowId].
|
///The window id of a [CreateWindowAction.windowId].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
final int? windowId;
|
final int? windowId;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onWebViewCreated}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onWebViewCreated}
|
||||||
///Event fired when the `WebView` is created.
|
///Event fired when the `WebView` is created.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -41,7 +41,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
final void Function(T controller)? onWebViewCreated;
|
final void Function(T controller)? onWebViewCreated;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onLoadStart}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onLoadStart}
|
||||||
///Event fired when the `WebView` starts to load an [url].
|
///Event fired when the `WebView` starts to load an [url].
|
||||||
///
|
///
|
||||||
///**NOTE for Web**: it will be dispatched at the same time of [onLoadStop] event
|
///**NOTE for Web**: it will be dispatched at the same time of [onLoadStop] event
|
||||||
@ -49,7 +49,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
///If `window.location.href` isn't accessible inside the iframe,
|
///If `window.location.href` isn't accessible inside the iframe,
|
||||||
///the [url] parameter will have the current value of the `iframe.src` attribute.
|
///the [url] parameter will have the current value of the `iframe.src` attribute.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewClient.onPageStarted](https://developer.android.com/reference/android/webkit/WebViewClient#onPageStarted(android.webkit.WebView,%20java.lang.String,%20android.graphics.Bitmap)))
|
///- Android native WebView ([Official API - WebViewClient.onPageStarted](https://developer.android.com/reference/android/webkit/WebViewClient#onPageStarted(android.webkit.WebView,%20java.lang.String,%20android.graphics.Bitmap)))
|
||||||
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455621-webview))
|
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455621-webview))
|
||||||
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455621-webview))
|
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455621-webview))
|
||||||
@ -57,13 +57,13 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
final void Function(T controller, WebUri? url)? onLoadStart;
|
final void Function(T controller, WebUri? url)? onLoadStart;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onLoadStop}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onLoadStop}
|
||||||
///Event fired when the `WebView` finishes loading an [url].
|
///Event fired when the `WebView` finishes loading an [url].
|
||||||
///
|
///
|
||||||
///**NOTE for Web**: If `window.location.href` isn't accessible inside the iframe,
|
///**NOTE for Web**: If `window.location.href` isn't accessible inside the iframe,
|
||||||
///the [url] parameter will have the current value of the `iframe.src` attribute.
|
///the [url] parameter will have the current value of the `iframe.src` attribute.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewClient.onPageFinished](https://developer.android.com/reference/android/webkit/WebViewClient#onPageFinished(android.webkit.WebView,%20java.lang.String)))
|
///- Android native WebView ([Official API - WebViewClient.onPageFinished](https://developer.android.com/reference/android/webkit/WebViewClient#onPageFinished(android.webkit.WebView,%20java.lang.String)))
|
||||||
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455629-webview))
|
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455629-webview))
|
||||||
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455629-webview))
|
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455629-webview))
|
||||||
@ -76,10 +76,10 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
final void Function(T controller, Uri? url, int code, String message)?
|
final void Function(T controller, Uri? url, int code, String message)?
|
||||||
onLoadError;
|
onLoadError;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onReceivedError}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onReceivedError}
|
||||||
///Event fired when the `WebView` encounters an [error] loading a [request].
|
///Event fired when the `WebView` encounters an [error] loading a [request].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewClient.onReceivedError](https://developer.android.com/reference/android/webkit/WebViewClient#onReceivedError(android.webkit.WebView,%20android.webkit.WebResourceRequest,%20android.webkit.WebResourceError)))
|
///- Android native WebView ([Official API - WebViewClient.onReceivedError](https://developer.android.com/reference/android/webkit/WebViewClient#onReceivedError(android.webkit.WebView,%20android.webkit.WebResourceRequest,%20android.webkit.WebResourceError)))
|
||||||
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455623-webview))
|
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455623-webview))
|
||||||
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455623-webview))
|
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455623-webview))
|
||||||
@ -94,7 +94,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
T controller, Uri? url, int statusCode, String description)?
|
T controller, Uri? url, int statusCode, String description)?
|
||||||
onLoadHttpError;
|
onLoadHttpError;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onReceivedHttpError}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onReceivedHttpError}
|
||||||
///Event fired when the `WebView` receives an HTTP error.
|
///Event fired when the `WebView` receives an HTTP error.
|
||||||
///
|
///
|
||||||
///[request] represents the originating request.
|
///[request] represents the originating request.
|
||||||
@ -103,7 +103,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
///
|
///
|
||||||
///**NOTE**: available on Android 23+.
|
///**NOTE**: available on Android 23+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewClient.onReceivedHttpError](https://developer.android.com/reference/android/webkit/WebViewClient#onReceivedHttpError(android.webkit.WebView,%20android.webkit.WebResourceRequest,%20android.webkit.WebResourceResponse)))
|
///- Android native WebView ([Official API - WebViewClient.onReceivedHttpError](https://developer.android.com/reference/android/webkit/WebViewClient#onReceivedHttpError(android.webkit.WebView,%20android.webkit.WebResourceRequest,%20android.webkit.WebResourceResponse)))
|
||||||
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455643-webview))
|
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455643-webview))
|
||||||
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455643-webview))
|
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455643-webview))
|
||||||
@ -111,22 +111,22 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
final void Function(T controller, WebResourceRequest request,
|
final void Function(T controller, WebResourceRequest request,
|
||||||
WebResourceResponse errorResponse)? onReceivedHttpError;
|
WebResourceResponse errorResponse)? onReceivedHttpError;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onProgressChanged}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onProgressChanged}
|
||||||
///Event fired when the current [progress] of loading a page is changed.
|
///Event fired when the current [progress] of loading a page is changed.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebChromeClient.onProgressChanged](https://developer.android.com/reference/android/webkit/WebChromeClient#onProgressChanged(android.webkit.WebView,%20int)))
|
///- Android native WebView ([Official API - WebChromeClient.onProgressChanged](https://developer.android.com/reference/android/webkit/WebChromeClient#onProgressChanged(android.webkit.WebView,%20int)))
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
final void Function(T controller, int progress)? onProgressChanged;
|
final void Function(T controller, int progress)? onProgressChanged;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onConsoleMessage}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onConsoleMessage}
|
||||||
///Event fired when the `WebView` receives a [ConsoleMessage].
|
///Event fired when the `WebView` receives a [ConsoleMessage].
|
||||||
///
|
///
|
||||||
///**NOTE for Web**: this event will be called only if the iframe has the same origin.
|
///**NOTE for Web**: this event will be called only if the iframe has the same origin.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebChromeClient.onConsoleMessage](https://developer.android.com/reference/android/webkit/WebChromeClient#onConsoleMessage(android.webkit.ConsoleMessage)))
|
///- Android native WebView ([Official API - WebChromeClient.onConsoleMessage](https://developer.android.com/reference/android/webkit/WebChromeClient#onConsoleMessage(android.webkit.ConsoleMessage)))
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -135,7 +135,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
final void Function(T controller, ConsoleMessage consoleMessage)?
|
final void Function(T controller, ConsoleMessage consoleMessage)?
|
||||||
onConsoleMessage;
|
onConsoleMessage;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.shouldOverrideUrlLoading}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.shouldOverrideUrlLoading}
|
||||||
///Give the host application a chance to take control when a URL is about to be loaded in the current WebView.
|
///Give the host application a chance to take control when a URL is about to be loaded in the current WebView.
|
||||||
///
|
///
|
||||||
///Note that on Android there isn't any way to load an URL for a frame that is not the main frame, so if the request is not for the main frame, the navigation is allowed by default.
|
///Note that on Android there isn't any way to load an URL for a frame that is not the main frame, so if the request is not for the main frame, the navigation is allowed by default.
|
||||||
@ -149,7 +149,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
///**NOTE**: In order to be able to listen this event, you need to set [InAppWebViewSettings.useShouldOverrideUrlLoading] setting to `true`.
|
///**NOTE**: In order to be able to listen this event, you need to set [InAppWebViewSettings.useShouldOverrideUrlLoading] setting to `true`.
|
||||||
///Also, on Android this event is not called on the first page load.
|
///Also, on Android this event is not called on the first page load.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewClient.shouldOverrideUrlLoading](https://developer.android.com/reference/android/webkit/WebViewClient#shouldOverrideUrlLoading(android.webkit.WebView,%20java.lang.String)))
|
///- Android native WebView ([Official API - WebViewClient.shouldOverrideUrlLoading](https://developer.android.com/reference/android/webkit/WebViewClient#shouldOverrideUrlLoading(android.webkit.WebView,%20java.lang.String)))
|
||||||
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455641-webview))
|
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455641-webview))
|
||||||
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455641-webview))
|
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455641-webview))
|
||||||
@ -158,19 +158,19 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
T controller, NavigationAction navigationAction)?
|
T controller, NavigationAction navigationAction)?
|
||||||
shouldOverrideUrlLoading;
|
shouldOverrideUrlLoading;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onLoadResource}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onLoadResource}
|
||||||
///Event fired when the `WebView` loads a resource.
|
///Event fired when the `WebView` loads a resource.
|
||||||
///
|
///
|
||||||
///**NOTE**: In order to be able to listen this event, you need to set [InAppWebViewSettings.useOnLoadResource] and [InAppWebViewSettings.javaScriptEnabled] setting to `true`.
|
///**NOTE**: In order to be able to listen this event, you need to set [InAppWebViewSettings.useOnLoadResource] and [InAppWebViewSettings.javaScriptEnabled] setting to `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
final void Function(T controller, LoadedResource resource)? onLoadResource;
|
final void Function(T controller, LoadedResource resource)? onLoadResource;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onScrollChanged}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onScrollChanged}
|
||||||
///Event fired when the `WebView` scrolls.
|
///Event fired when the `WebView` scrolls.
|
||||||
///
|
///
|
||||||
///[x] represents the current horizontal scroll origin in pixels.
|
///[x] represents the current horizontal scroll origin in pixels.
|
||||||
@ -181,7 +181,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
///
|
///
|
||||||
///**NOTE for MacOS**: this method is implemented with using JavaScript.
|
///**NOTE for MacOS**: this method is implemented with using JavaScript.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebView.onScrollChanged](https://developer.android.com/reference/android/webkit/WebView#onScrollChanged(int,%20int,%20int,%20int)))
|
///- Android native WebView ([Official API - WebView.onScrollChanged](https://developer.android.com/reference/android/webkit/WebView#onScrollChanged(int,%20int,%20int,%20int)))
|
||||||
///- iOS ([Official API - UIScrollViewDelegate.scrollViewDidScroll](https://developer.apple.com/documentation/uikit/uiscrollviewdelegate/1619392-scrollviewdidscroll))
|
///- iOS ([Official API - UIScrollViewDelegate.scrollViewDidScroll](https://developer.apple.com/documentation/uikit/uiscrollviewdelegate/1619392-scrollviewdidscroll))
|
||||||
///- Web ([Official API - Window.onscroll](https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onscroll))
|
///- Web ([Official API - Window.onscroll](https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onscroll))
|
||||||
@ -193,7 +193,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
@Deprecated('Use onDownloadStartRequest instead')
|
@Deprecated('Use onDownloadStartRequest instead')
|
||||||
final void Function(T controller, Uri url)? onDownloadStart;
|
final void Function(T controller, Uri url)? onDownloadStart;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onDownloadStartRequest}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onDownloadStartRequest}
|
||||||
///Event fired when `WebView` recognizes a downloadable file.
|
///Event fired when `WebView` recognizes a downloadable file.
|
||||||
///To download the file, you can use the [flutter_downloader](https://pub.dev/packages/flutter_downloader) plugin.
|
///To download the file, you can use the [flutter_downloader](https://pub.dev/packages/flutter_downloader) plugin.
|
||||||
///
|
///
|
||||||
@ -201,7 +201,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
///
|
///
|
||||||
///**NOTE**: In order to be able to listen this event, you need to set [InAppWebViewSettings.useOnDownloadStart] setting to `true`.
|
///**NOTE**: In order to be able to listen this event, you need to set [InAppWebViewSettings.useOnDownloadStart] setting to `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebView.setDownloadListener](https://developer.android.com/reference/android/webkit/WebView#setDownloadListener(android.webkit.DownloadListener)))
|
///- Android native WebView ([Official API - WebView.setDownloadListener](https://developer.android.com/reference/android/webkit/WebView#setDownloadListener(android.webkit.DownloadListener)))
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -214,11 +214,11 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
final Future<CustomSchemeResponse?> Function(T controller, Uri url)?
|
final Future<CustomSchemeResponse?> Function(T controller, Uri url)?
|
||||||
onLoadResourceCustomScheme;
|
onLoadResourceCustomScheme;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onLoadResourceWithCustomScheme}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onLoadResourceWithCustomScheme}
|
||||||
///Event fired when the `WebView` finds the `custom-scheme` while loading a resource.
|
///Event fired when the `WebView` finds the `custom-scheme` while loading a resource.
|
||||||
///Here you can handle the url [request] and return a [CustomSchemeResponse] to load a specific resource encoded to `base64`.
|
///Here you can handle the url [request] and return a [CustomSchemeResponse] to load a specific resource encoded to `base64`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS ([Official API - WKURLSchemeHandler](https://developer.apple.com/documentation/webkit/wkurlschemehandler))
|
///- iOS ([Official API - WKURLSchemeHandler](https://developer.apple.com/documentation/webkit/wkurlschemehandler))
|
||||||
///- MacOS ([Official API - WKURLSchemeHandler](https://developer.apple.com/documentation/webkit/wkurlschemehandler))
|
///- MacOS ([Official API - WKURLSchemeHandler](https://developer.apple.com/documentation/webkit/wkurlschemehandler))
|
||||||
@ -226,7 +226,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
final Future<CustomSchemeResponse?> Function(
|
final Future<CustomSchemeResponse?> Function(
|
||||||
T controller, WebResourceRequest request)? onLoadResourceWithCustomScheme;
|
T controller, WebResourceRequest request)? onLoadResourceWithCustomScheme;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onCreateWindow}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onCreateWindow}
|
||||||
///Event fired when the `WebView` requests the host application to create a new window,
|
///Event fired when the `WebView` requests the host application to create a new window,
|
||||||
///for example when trying to open a link with `target="_blank"` or when `window.open()` is called by JavaScript side.
|
///for example when trying to open a link with `target="_blank"` or when `window.open()` is called by JavaScript side.
|
||||||
///If the host application chooses to honor this request, it should return `true` from this method, create a new WebView to host the window.
|
///If the host application chooses to honor this request, it should return `true` from this method, create a new WebView to host the window.
|
||||||
@ -259,7 +259,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
///**NOTE for Web**: this event will be called only if the iframe has the same origin. It works only for `window.open()` javascript calls.
|
///**NOTE for Web**: this event will be called only if the iframe has the same origin. It works only for `window.open()` javascript calls.
|
||||||
///Also, there is no way to block the opening the window in a synchronous way, so returning `true` will just close it quickly.
|
///Also, there is no way to block the opening the window in a synchronous way, so returning `true` will just close it quickly.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebChromeClient.onCreateWindow](https://developer.android.com/reference/android/webkit/WebChromeClient#onCreateWindow(android.webkit.WebView,%20boolean,%20boolean,%20android.os.Message)))
|
///- Android native WebView ([Official API - WebChromeClient.onCreateWindow](https://developer.android.com/reference/android/webkit/WebChromeClient#onCreateWindow(android.webkit.WebView,%20boolean,%20boolean,%20android.os.Message)))
|
||||||
///- iOS ([Official API - WKUIDelegate.webView](https://developer.apple.com/documentation/webkit/wkuidelegate/1536907-webview))
|
///- iOS ([Official API - WKUIDelegate.webView](https://developer.apple.com/documentation/webkit/wkuidelegate/1536907-webview))
|
||||||
///- MacOS ([Official API - WKUIDelegate.webView](https://developer.apple.com/documentation/webkit/wkuidelegate/1536907-webview))
|
///- MacOS ([Official API - WKUIDelegate.webView](https://developer.apple.com/documentation/webkit/wkuidelegate/1536907-webview))
|
||||||
@ -268,24 +268,24 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
final Future<bool?> Function(
|
final Future<bool?> Function(
|
||||||
T controller, CreateWindowAction createWindowAction)? onCreateWindow;
|
T controller, CreateWindowAction createWindowAction)? onCreateWindow;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onCloseWindow}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onCloseWindow}
|
||||||
///Event fired when the host application should close the given WebView and remove it from the view system if necessary.
|
///Event fired when the host application should close the given WebView and remove it from the view system if necessary.
|
||||||
///At this point, WebCore has stopped any loading in this window and has removed any cross-scripting ability in javascript.
|
///At this point, WebCore has stopped any loading in this window and has removed any cross-scripting ability in javascript.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebChromeClient.onCloseWindow](https://developer.android.com/reference/android/webkit/WebChromeClient#onCloseWindow(android.webkit.WebView)))
|
///- Android native WebView ([Official API - WebChromeClient.onCloseWindow](https://developer.android.com/reference/android/webkit/WebChromeClient#onCloseWindow(android.webkit.WebView)))
|
||||||
///- iOS ([Official API - WKUIDelegate.webViewDidClose](https://developer.apple.com/documentation/webkit/wkuidelegate/1537390-webviewdidclose))
|
///- iOS ([Official API - WKUIDelegate.webViewDidClose](https://developer.apple.com/documentation/webkit/wkuidelegate/1537390-webviewdidclose))
|
||||||
///- MacOS ([Official API - WKUIDelegate.webViewDidClose](https://developer.apple.com/documentation/webkit/wkuidelegate/1537390-webviewdidclose))
|
///- MacOS ([Official API - WKUIDelegate.webViewDidClose](https://developer.apple.com/documentation/webkit/wkuidelegate/1537390-webviewdidclose))
|
||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
final void Function(T controller)? onCloseWindow;
|
final void Function(T controller)? onCloseWindow;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onWindowFocus}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onWindowFocus}
|
||||||
///Event fired when the JavaScript `window` object of the WebView has received focus.
|
///Event fired when the JavaScript `window` object of the WebView has received focus.
|
||||||
///This is the result of the `focus` JavaScript event applied to the `window` object.
|
///This is the result of the `focus` JavaScript event applied to the `window` object.
|
||||||
///
|
///
|
||||||
///**NOTE for Web**: this event will be called only if the iframe has the same origin.
|
///**NOTE for Web**: this event will be called only if the iframe has the same origin.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -293,13 +293,13 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
final void Function(T controller)? onWindowFocus;
|
final void Function(T controller)? onWindowFocus;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onWindowBlur}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onWindowBlur}
|
||||||
///Event fired when the JavaScript `window` object of the WebView has lost focus.
|
///Event fired when the JavaScript `window` object of the WebView has lost focus.
|
||||||
///This is the result of the `blur` JavaScript event applied to the `window` object.
|
///This is the result of the `blur` JavaScript event applied to the `window` object.
|
||||||
///
|
///
|
||||||
///**NOTE for Web**: this event will be called only if the iframe has the same origin.
|
///**NOTE for Web**: this event will be called only if the iframe has the same origin.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -307,13 +307,13 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
final void Function(T controller)? onWindowBlur;
|
final void Function(T controller)? onWindowBlur;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onJsAlert}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onJsAlert}
|
||||||
///Event fired when javascript calls the `alert()` method to display an alert dialog.
|
///Event fired when javascript calls the `alert()` method to display an alert dialog.
|
||||||
///If [JsAlertResponse.handledByClient] is `true`, the webview will assume that the client will handle the dialog.
|
///If [JsAlertResponse.handledByClient] is `true`, the webview will assume that the client will handle the dialog.
|
||||||
///
|
///
|
||||||
///[jsAlertRequest] contains the message to be displayed in the alert dialog and the of the page requesting the dialog.
|
///[jsAlertRequest] contains the message to be displayed in the alert dialog and the of the page requesting the dialog.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebChromeClient.onJsAlert](https://developer.android.com/reference/android/webkit/WebChromeClient#onJsAlert(android.webkit.WebView,%20java.lang.String,%20java.lang.String,%20android.webkit.JsResult)))
|
///- Android native WebView ([Official API - WebChromeClient.onJsAlert](https://developer.android.com/reference/android/webkit/WebChromeClient#onJsAlert(android.webkit.WebView,%20java.lang.String,%20java.lang.String,%20android.webkit.JsResult)))
|
||||||
///- iOS ([Official API - WKUIDelegate.webView](https://developer.apple.com/documentation/webkit/wkuidelegate/1537406-webview))
|
///- iOS ([Official API - WKUIDelegate.webView](https://developer.apple.com/documentation/webkit/wkuidelegate/1537406-webview))
|
||||||
///- MacOS ([Official API - WKUIDelegate.webView](https://developer.apple.com/documentation/webkit/wkuidelegate/1537406-webview))
|
///- MacOS ([Official API - WKUIDelegate.webView](https://developer.apple.com/documentation/webkit/wkuidelegate/1537406-webview))
|
||||||
@ -321,13 +321,13 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
final Future<JsAlertResponse?> Function(
|
final Future<JsAlertResponse?> Function(
|
||||||
T controller, JsAlertRequest jsAlertRequest)? onJsAlert;
|
T controller, JsAlertRequest jsAlertRequest)? onJsAlert;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onJsConfirm}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onJsConfirm}
|
||||||
///Event fired when javascript calls the `confirm()` method to display a confirm dialog.
|
///Event fired when javascript calls the `confirm()` method to display a confirm dialog.
|
||||||
///If [JsConfirmResponse.handledByClient] is `true`, the webview will assume that the client will handle the dialog.
|
///If [JsConfirmResponse.handledByClient] is `true`, the webview will assume that the client will handle the dialog.
|
||||||
///
|
///
|
||||||
///[jsConfirmRequest] contains the message to be displayed in the confirm dialog and the of the page requesting the dialog.
|
///[jsConfirmRequest] contains the message to be displayed in the confirm dialog and the of the page requesting the dialog.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebChromeClient.onJsConfirm](https://developer.android.com/reference/android/webkit/WebChromeClient#onJsConfirm(android.webkit.WebView,%20java.lang.String,%20java.lang.String,%20android.webkit.JsResult)))
|
///- Android native WebView ([Official API - WebChromeClient.onJsConfirm](https://developer.android.com/reference/android/webkit/WebChromeClient#onJsConfirm(android.webkit.WebView,%20java.lang.String,%20java.lang.String,%20android.webkit.JsResult)))
|
||||||
///- iOS ([Official API - WKUIDelegate.webView](https://developer.apple.com/documentation/webkit/wkuidelegate/1536489-webview))
|
///- iOS ([Official API - WKUIDelegate.webView](https://developer.apple.com/documentation/webkit/wkuidelegate/1536489-webview))
|
||||||
///- MacOS ([Official API - WKUIDelegate.webView](https://developer.apple.com/documentation/webkit/wkuidelegate/1536489-webview))
|
///- MacOS ([Official API - WKUIDelegate.webView](https://developer.apple.com/documentation/webkit/wkuidelegate/1536489-webview))
|
||||||
@ -335,13 +335,13 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
final Future<JsConfirmResponse?> Function(
|
final Future<JsConfirmResponse?> Function(
|
||||||
T controller, JsConfirmRequest jsConfirmRequest)? onJsConfirm;
|
T controller, JsConfirmRequest jsConfirmRequest)? onJsConfirm;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onJsPrompt}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onJsPrompt}
|
||||||
///Event fired when javascript calls the `prompt()` method to display a prompt dialog.
|
///Event fired when javascript calls the `prompt()` method to display a prompt dialog.
|
||||||
///If [JsPromptResponse.handledByClient] is `true`, the webview will assume that the client will handle the dialog.
|
///If [JsPromptResponse.handledByClient] is `true`, the webview will assume that the client will handle the dialog.
|
||||||
///
|
///
|
||||||
///[jsPromptRequest] contains the message to be displayed in the prompt dialog, the default value displayed in the prompt dialog, and the of the page requesting the dialog.
|
///[jsPromptRequest] contains the message to be displayed in the prompt dialog, the default value displayed in the prompt dialog, and the of the page requesting the dialog.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebChromeClient.onJsPrompt](https://developer.android.com/reference/android/webkit/WebChromeClient#onJsPrompt(android.webkit.WebView,%20java.lang.String,%20java.lang.String,%20java.lang.String,%20android.webkit.JsPromptResult)))
|
///- Android native WebView ([Official API - WebChromeClient.onJsPrompt](https://developer.android.com/reference/android/webkit/WebChromeClient#onJsPrompt(android.webkit.WebView,%20java.lang.String,%20java.lang.String,%20java.lang.String,%20android.webkit.JsPromptResult)))
|
||||||
///- iOS ([Official API - WKUIDelegate.webView](https://developer.apple.com/documentation/webkit/wkuidelegate/1538086-webview))
|
///- iOS ([Official API - WKUIDelegate.webView](https://developer.apple.com/documentation/webkit/wkuidelegate/1538086-webview))
|
||||||
///- MacOS ([Official API - WKUIDelegate.webView](https://developer.apple.com/documentation/webkit/wkuidelegate/1538086-webview))
|
///- MacOS ([Official API - WKUIDelegate.webView](https://developer.apple.com/documentation/webkit/wkuidelegate/1538086-webview))
|
||||||
@ -349,12 +349,12 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
final Future<JsPromptResponse?> Function(
|
final Future<JsPromptResponse?> Function(
|
||||||
T controller, JsPromptRequest jsPromptRequest)? onJsPrompt;
|
T controller, JsPromptRequest jsPromptRequest)? onJsPrompt;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onReceivedHttpAuthRequest}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onReceivedHttpAuthRequest}
|
||||||
///Event fired when the WebView received an HTTP authentication request. The default behavior is to cancel the request.
|
///Event fired when the WebView received an HTTP authentication request. The default behavior is to cancel the request.
|
||||||
///
|
///
|
||||||
///[challenge] contains data about host, port, protocol, realm, etc. as specified in the [URLAuthenticationChallenge].
|
///[challenge] contains data about host, port, protocol, realm, etc. as specified in the [URLAuthenticationChallenge].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewClient.onReceivedHttpAuthRequest](https://developer.android.com/reference/android/webkit/WebViewClient#onReceivedHttpAuthRequest(android.webkit.WebView,%20android.webkit.HttpAuthHandler,%20java.lang.String,%20java.lang.String)))
|
///- Android native WebView ([Official API - WebViewClient.onReceivedHttpAuthRequest](https://developer.android.com/reference/android/webkit/WebViewClient#onReceivedHttpAuthRequest(android.webkit.WebView,%20android.webkit.HttpAuthHandler,%20java.lang.String,%20java.lang.String)))
|
||||||
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455638-webview))
|
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455638-webview))
|
||||||
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455638-webview))
|
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455638-webview))
|
||||||
@ -363,13 +363,13 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
T controller, HttpAuthenticationChallenge challenge)?
|
T controller, HttpAuthenticationChallenge challenge)?
|
||||||
onReceivedHttpAuthRequest;
|
onReceivedHttpAuthRequest;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onReceivedServerTrustAuthRequest}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onReceivedServerTrustAuthRequest}
|
||||||
///Event fired when the WebView need to perform server trust authentication (certificate validation).
|
///Event fired when the WebView need to perform server trust authentication (certificate validation).
|
||||||
///The host application must return either [ServerTrustAuthResponse] instance with [ServerTrustAuthResponseAction.CANCEL] or [ServerTrustAuthResponseAction.PROCEED].
|
///The host application must return either [ServerTrustAuthResponse] instance with [ServerTrustAuthResponseAction.CANCEL] or [ServerTrustAuthResponseAction.PROCEED].
|
||||||
///
|
///
|
||||||
///[challenge] contains data about host, port, protocol, realm, etc. as specified in the [ServerTrustChallenge].
|
///[challenge] contains data about host, port, protocol, realm, etc. as specified in the [ServerTrustChallenge].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewClient.onReceivedSslError](https://developer.android.com/reference/android/webkit/WebViewClient#onReceivedSslError(android.webkit.WebView,%20android.webkit.SslErrorHandler,%20android.net.http.SslError)))
|
///- Android native WebView ([Official API - WebViewClient.onReceivedSslError](https://developer.android.com/reference/android/webkit/WebViewClient#onReceivedSslError(android.webkit.WebView,%20android.webkit.SslErrorHandler,%20android.net.http.SslError)))
|
||||||
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455638-webview))
|
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455638-webview))
|
||||||
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455638-webview))
|
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455638-webview))
|
||||||
@ -378,7 +378,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
T controller, ServerTrustChallenge challenge)?
|
T controller, ServerTrustChallenge challenge)?
|
||||||
onReceivedServerTrustAuthRequest;
|
onReceivedServerTrustAuthRequest;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onReceivedClientCertRequest}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onReceivedClientCertRequest}
|
||||||
///Notify the host application to handle an SSL client certificate request.
|
///Notify the host application to handle an SSL client certificate request.
|
||||||
///Webview stores the response in memory (for the life of the application) if [ClientCertResponseAction.PROCEED] or [ClientCertResponseAction.CANCEL]
|
///Webview stores the response in memory (for the life of the application) if [ClientCertResponseAction.PROCEED] or [ClientCertResponseAction.CANCEL]
|
||||||
///is called and does not call [onReceivedClientCertRequest] again for the same host and port pair.
|
///is called and does not call [onReceivedClientCertRequest] again for the same host and port pair.
|
||||||
@ -386,7 +386,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
///
|
///
|
||||||
///[challenge] contains data about host, port, protocol, realm, etc. as specified in the [ClientCertChallenge].
|
///[challenge] contains data about host, port, protocol, realm, etc. as specified in the [ClientCertChallenge].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewClient.onReceivedClientCertRequest](https://developer.android.com/reference/android/webkit/WebViewClient#onReceivedClientCertRequest(android.webkit.WebView,%20android.webkit.ClientCertRequest)))
|
///- Android native WebView ([Official API - WebViewClient.onReceivedClientCertRequest](https://developer.android.com/reference/android/webkit/WebViewClient#onReceivedClientCertRequest(android.webkit.WebView,%20android.webkit.ClientCertRequest)))
|
||||||
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455638-webview))
|
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455638-webview))
|
||||||
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455638-webview))
|
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455638-webview))
|
||||||
@ -399,7 +399,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
final void Function(T controller, int activeMatchOrdinal, int numberOfMatches,
|
final void Function(T controller, int activeMatchOrdinal, int numberOfMatches,
|
||||||
bool isDoneCounting)? onFindResultReceived;
|
bool isDoneCounting)? onFindResultReceived;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.shouldInterceptAjaxRequest}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.shouldInterceptAjaxRequest}
|
||||||
///Event fired when an `XMLHttpRequest` is sent to a server.
|
///Event fired when an `XMLHttpRequest` is sent to a server.
|
||||||
///It gives the host application a chance to take control over the request before sending it.
|
///It gives the host application a chance to take control over the request before sending it.
|
||||||
///
|
///
|
||||||
@ -411,7 +411,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
///used to intercept ajax requests is loaded as soon as possible so it won't be instantaneous as iOS but just after some milliseconds (< ~100ms).
|
///used to intercept ajax requests is loaded as soon as possible so it won't be instantaneous as iOS but just after some milliseconds (< ~100ms).
|
||||||
///Inside the `window.addEventListener("flutterInAppWebViewPlatformReady")` event, the ajax requests will be intercept for sure.
|
///Inside the `window.addEventListener("flutterInAppWebViewPlatformReady")` event, the ajax requests will be intercept for sure.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -419,7 +419,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
final Future<AjaxRequest?> Function(T controller, AjaxRequest ajaxRequest)?
|
final Future<AjaxRequest?> Function(T controller, AjaxRequest ajaxRequest)?
|
||||||
shouldInterceptAjaxRequest;
|
shouldInterceptAjaxRequest;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onAjaxReadyStateChange}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onAjaxReadyStateChange}
|
||||||
///Event fired whenever the `readyState` attribute of an `XMLHttpRequest` changes.
|
///Event fired whenever the `readyState` attribute of an `XMLHttpRequest` changes.
|
||||||
///It gives the host application a chance to abort the request.
|
///It gives the host application a chance to abort the request.
|
||||||
///
|
///
|
||||||
@ -431,7 +431,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
///used to intercept ajax requests is loaded as soon as possible so it won't be instantaneous as iOS but just after some milliseconds (< ~100ms).
|
///used to intercept ajax requests is loaded as soon as possible so it won't be instantaneous as iOS but just after some milliseconds (< ~100ms).
|
||||||
///Inside the `window.addEventListener("flutterInAppWebViewPlatformReady")` event, the ajax requests will be intercept for sure.
|
///Inside the `window.addEventListener("flutterInAppWebViewPlatformReady")` event, the ajax requests will be intercept for sure.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -439,7 +439,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
final Future<AjaxRequestAction?> Function(
|
final Future<AjaxRequestAction?> Function(
|
||||||
T controller, AjaxRequest ajaxRequest)? onAjaxReadyStateChange;
|
T controller, AjaxRequest ajaxRequest)? onAjaxReadyStateChange;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onAjaxProgress}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onAjaxProgress}
|
||||||
///Event fired as an `XMLHttpRequest` progress.
|
///Event fired as an `XMLHttpRequest` progress.
|
||||||
///It gives the host application a chance to abort the request.
|
///It gives the host application a chance to abort the request.
|
||||||
///
|
///
|
||||||
@ -451,7 +451,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
///used to intercept ajax requests is loaded as soon as possible so it won't be instantaneous as iOS but just after some milliseconds (< ~100ms).
|
///used to intercept ajax requests is loaded as soon as possible so it won't be instantaneous as iOS but just after some milliseconds (< ~100ms).
|
||||||
///Inside the `window.addEventListener("flutterInAppWebViewPlatformReady")` event, the ajax requests will be intercept for sure.
|
///Inside the `window.addEventListener("flutterInAppWebViewPlatformReady")` event, the ajax requests will be intercept for sure.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -459,7 +459,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
final Future<AjaxRequestAction?> Function(
|
final Future<AjaxRequestAction?> Function(
|
||||||
T controller, AjaxRequest ajaxRequest)? onAjaxProgress;
|
T controller, AjaxRequest ajaxRequest)? onAjaxProgress;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.shouldInterceptFetchRequest}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.shouldInterceptFetchRequest}
|
||||||
///Event fired when a request is sent to a server through [Fetch API](https://developer.mozilla.org/it/docs/Web/API/Fetch_API).
|
///Event fired when a request is sent to a server through [Fetch API](https://developer.mozilla.org/it/docs/Web/API/Fetch_API).
|
||||||
///It gives the host application a chance to take control over the request before sending it.
|
///It gives the host application a chance to take control over the request before sending it.
|
||||||
///
|
///
|
||||||
@ -471,7 +471,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
///used to intercept fetch requests is loaded as soon as possible so it won't be instantaneous as iOS but just after some milliseconds (< ~100ms).
|
///used to intercept fetch requests is loaded as soon as possible so it won't be instantaneous as iOS but just after some milliseconds (< ~100ms).
|
||||||
///Inside the `window.addEventListener("flutterInAppWebViewPlatformReady")` event, the fetch requests will be intercept for sure.
|
///Inside the `window.addEventListener("flutterInAppWebViewPlatformReady")` event, the fetch requests will be intercept for sure.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -479,7 +479,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
final Future<FetchRequest?> Function(T controller, FetchRequest fetchRequest)?
|
final Future<FetchRequest?> Function(T controller, FetchRequest fetchRequest)?
|
||||||
shouldInterceptFetchRequest;
|
shouldInterceptFetchRequest;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onUpdateVisitedHistory}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onUpdateVisitedHistory}
|
||||||
///Event fired when the host application updates its visited links database.
|
///Event fired when the host application updates its visited links database.
|
||||||
///This event is also fired when the navigation state of the `WebView` changes through the usage of
|
///This event is also fired when the navigation state of the `WebView` changes through the usage of
|
||||||
///javascript **[History API](https://developer.mozilla.org/en-US/docs/Web/API/History_API)** functions (`pushState()`, `replaceState()`) and `onpopstate` event
|
///javascript **[History API](https://developer.mozilla.org/en-US/docs/Web/API/History_API)** functions (`pushState()`, `replaceState()`) and `onpopstate` event
|
||||||
@ -491,7 +491,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
///
|
///
|
||||||
///**NOTE for Web**: this event will be called only if the iframe has the same origin.
|
///**NOTE for Web**: this event will be called only if the iframe has the same origin.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewClient.doUpdateVisitedHistory](https://developer.android.com/reference/android/webkit/WebViewClient#doUpdateVisitedHistory(android.webkit.WebView,%20java.lang.String,%20boolean)))
|
///- Android native WebView ([Official API - WebViewClient.doUpdateVisitedHistory](https://developer.android.com/reference/android/webkit/WebViewClient#doUpdateVisitedHistory(android.webkit.WebView,%20java.lang.String,%20boolean)))
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -504,7 +504,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
@Deprecated("Use onPrintRequest instead")
|
@Deprecated("Use onPrintRequest instead")
|
||||||
final void Function(T controller, Uri? url)? onPrint;
|
final void Function(T controller, Uri? url)? onPrint;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onPrintRequest}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onPrintRequest}
|
||||||
///Event fired when `window.print()` is called from JavaScript side.
|
///Event fired when `window.print()` is called from JavaScript side.
|
||||||
///Return `true` if you want to handle the print job.
|
///Return `true` if you want to handle the print job.
|
||||||
///Otherwise return `false`, so the [PlatformPrintJobController] will be handled and disposed automatically by the system.
|
///Otherwise return `false`, so the [PlatformPrintJobController] will be handled and disposed automatically by the system.
|
||||||
@ -516,7 +516,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
///
|
///
|
||||||
///**NOTE for Web**: this event will be called only if the iframe has the same origin.
|
///**NOTE for Web**: this event will be called only if the iframe has the same origin.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -525,22 +525,22 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
final Future<bool?> Function(T controller, WebUri? url,
|
final Future<bool?> Function(T controller, WebUri? url,
|
||||||
PlatformPrintJobController? printJobController)? onPrintRequest;
|
PlatformPrintJobController? printJobController)? onPrintRequest;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onLongPressHitTestResult}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onLongPressHitTestResult}
|
||||||
///Event fired when an HTML element of the webview has been clicked and held.
|
///Event fired when an HTML element of the webview has been clicked and held.
|
||||||
///
|
///
|
||||||
///[hitTestResult] represents the hit result for hitting an HTML elements.
|
///[hitTestResult] represents the hit result for hitting an HTML elements.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - View.setOnLongClickListener](https://developer.android.com/reference/android/view/View#setOnLongClickListener(android.view.View.OnLongClickListener)))
|
///- Android native WebView ([Official API - View.setOnLongClickListener](https://developer.android.com/reference/android/view/View#setOnLongClickListener(android.view.View.OnLongClickListener)))
|
||||||
///- iOS ([Official API - UILongPressGestureRecognizer](https://developer.apple.com/documentation/uikit/uilongpressgesturerecognizer))
|
///- iOS ([Official API - UILongPressGestureRecognizer](https://developer.apple.com/documentation/uikit/uilongpressgesturerecognizer))
|
||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
final void Function(T controller, InAppWebViewHitTestResult hitTestResult)?
|
final void Function(T controller, InAppWebViewHitTestResult hitTestResult)?
|
||||||
onLongPressHitTestResult;
|
onLongPressHitTestResult;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onEnterFullscreen}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onEnterFullscreen}
|
||||||
///Event fired when the current page has entered full screen mode.
|
///Event fired when the current page has entered full screen mode.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebChromeClient.onShowCustomView](https://developer.android.com/reference/android/webkit/WebChromeClient#onShowCustomView(android.view.View,%20android.webkit.WebChromeClient.CustomViewCallback)))
|
///- Android native WebView ([Official API - WebChromeClient.onShowCustomView](https://developer.android.com/reference/android/webkit/WebChromeClient#onShowCustomView(android.view.View,%20android.webkit.WebChromeClient.CustomViewCallback)))
|
||||||
///- iOS ([Official API - UIWindow.didBecomeVisibleNotification](https://developer.apple.com/documentation/uikit/uiwindow/1621621-didbecomevisiblenotification))
|
///- iOS ([Official API - UIWindow.didBecomeVisibleNotification](https://developer.apple.com/documentation/uikit/uiwindow/1621621-didbecomevisiblenotification))
|
||||||
///- MacOS ([Official API - NSWindow.didEnterFullScreenNotification](https://developer.apple.com/documentation/appkit/nswindow/1419651-didenterfullscreennotification))
|
///- MacOS ([Official API - NSWindow.didEnterFullScreenNotification](https://developer.apple.com/documentation/appkit/nswindow/1419651-didenterfullscreennotification))
|
||||||
@ -548,14 +548,14 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
final void Function(T controller)? onEnterFullscreen;
|
final void Function(T controller)? onEnterFullscreen;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onExitFullscreen}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onExitFullscreen}
|
||||||
///Event fired when the current page has exited full screen mode.
|
///Event fired when the current page has exited full screen mode.
|
||||||
///
|
///
|
||||||
///**Official Android API**: https://developer.android.com/reference/android/webkit/WebChromeClient#onHideCustomView()
|
///**Official Android API**: https://developer.android.com/reference/android/webkit/WebChromeClient#onHideCustomView()
|
||||||
///
|
///
|
||||||
///**Official iOS API**: https://developer.apple.com/documentation/uikit/uiwindow/1621617-didbecomehiddennotification
|
///**Official iOS API**: https://developer.apple.com/documentation/uikit/uiwindow/1621617-didbecomehiddennotification
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebChromeClient.onHideCustomView](https://developer.android.com/reference/android/webkit/WebChromeClient#onHideCustomView()))
|
///- Android native WebView ([Official API - WebChromeClient.onHideCustomView](https://developer.android.com/reference/android/webkit/WebChromeClient#onHideCustomView()))
|
||||||
///- iOS ([Official API - UIWindow.didBecomeHiddenNotification](https://developer.apple.com/documentation/uikit/uiwindow/1621617-didbecomehiddennotification))
|
///- iOS ([Official API - UIWindow.didBecomeHiddenNotification](https://developer.apple.com/documentation/uikit/uiwindow/1621617-didbecomehiddennotification))
|
||||||
///- MacOS ([Official API - NSWindow.didExitFullScreenNotification](https://developer.apple.com/documentation/appkit/nswindow/1419177-didexitfullscreennotification))
|
///- MacOS ([Official API - NSWindow.didExitFullScreenNotification](https://developer.apple.com/documentation/appkit/nswindow/1419177-didexitfullscreennotification))
|
||||||
@ -563,7 +563,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
final void Function(T controller)? onExitFullscreen;
|
final void Function(T controller)? onExitFullscreen;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onPageCommitVisible}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onPageCommitVisible}
|
||||||
///Called when the web view begins to receive web content.
|
///Called when the web view begins to receive web content.
|
||||||
///
|
///
|
||||||
///This event occurs early in the document loading process, and as such
|
///This event occurs early in the document loading process, and as such
|
||||||
@ -571,21 +571,21 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
///
|
///
|
||||||
///[url] represents the URL corresponding to the page navigation that triggered this callback.
|
///[url] represents the URL corresponding to the page navigation that triggered this callback.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewClient.onPageCommitVisible](https://developer.android.com/reference/android/webkit/WebViewClient#onPageCommitVisible(android.webkit.WebView,%20java.lang.String)))
|
///- Android native WebView ([Official API - WebViewClient.onPageCommitVisible](https://developer.android.com/reference/android/webkit/WebViewClient#onPageCommitVisible(android.webkit.WebView,%20java.lang.String)))
|
||||||
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455635-webview))
|
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455635-webview))
|
||||||
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455635-webview))
|
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455635-webview))
|
||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
final void Function(T controller, WebUri? url)? onPageCommitVisible;
|
final void Function(T controller, WebUri? url)? onPageCommitVisible;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onTitleChanged}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onTitleChanged}
|
||||||
///Event fired when a change in the document title occurred.
|
///Event fired when a change in the document title occurred.
|
||||||
///
|
///
|
||||||
///[title] represents the string containing the new title of the document.
|
///[title] represents the string containing the new title of the document.
|
||||||
///
|
///
|
||||||
///**NOTE for Web**: this event will be called only if the iframe has the same origin.
|
///**NOTE for Web**: this event will be called only if the iframe has the same origin.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebChromeClient.onReceivedTitle](https://developer.android.com/reference/android/webkit/WebChromeClient#onReceivedTitle(android.webkit.WebView,%20java.lang.String)))
|
///- Android native WebView ([Official API - WebChromeClient.onReceivedTitle](https://developer.android.com/reference/android/webkit/WebChromeClient#onReceivedTitle(android.webkit.WebView,%20java.lang.String)))
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -593,7 +593,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
final void Function(T controller, String? title)? onTitleChanged;
|
final void Function(T controller, String? title)? onTitleChanged;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onOverScrolled}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onOverScrolled}
|
||||||
///Event fired to respond to the results of an over-scroll operation.
|
///Event fired to respond to the results of an over-scroll operation.
|
||||||
///
|
///
|
||||||
///[x] represents the new X scroll value in pixels.
|
///[x] represents the new X scroll value in pixels.
|
||||||
@ -604,14 +604,14 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
///
|
///
|
||||||
///[clampedY] is `true` if [y] was clamped to an over-scroll boundary.
|
///[clampedY] is `true` if [y] was clamped to an over-scroll boundary.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebView.onOverScrolled](https://developer.android.com/reference/android/webkit/WebView#onOverScrolled(int,%20int,%20boolean,%20boolean)))
|
///- Android native WebView ([Official API - WebView.onOverScrolled](https://developer.android.com/reference/android/webkit/WebView#onOverScrolled(int,%20int,%20boolean,%20boolean)))
|
||||||
///- iOS
|
///- iOS
|
||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
final void Function(T controller, int x, int y, bool clampedX, bool clampedY)?
|
final void Function(T controller, int x, int y, bool clampedX, bool clampedY)?
|
||||||
onOverScrolled;
|
onOverScrolled;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onZoomScaleChanged}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onZoomScaleChanged}
|
||||||
///Event fired when the zoom scale of the WebView has changed.
|
///Event fired when the zoom scale of the WebView has changed.
|
||||||
///
|
///
|
||||||
///[oldScale] The old zoom scale factor.
|
///[oldScale] The old zoom scale factor.
|
||||||
@ -620,7 +620,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
///
|
///
|
||||||
///**NOTE for Web**: this event will be called only if the iframe has the same origin.
|
///**NOTE for Web**: this event will be called only if the iframe has the same origin.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewClient.onScaleChanged](https://developer.android.com/reference/android/webkit/WebViewClient#onScaleChanged(android.webkit.WebView,%20float,%20float)))
|
///- Android native WebView ([Official API - WebViewClient.onScaleChanged](https://developer.android.com/reference/android/webkit/WebViewClient#onScaleChanged(android.webkit.WebView,%20float,%20float)))
|
||||||
///- iOS ([Official API - UIScrollViewDelegate.scrollViewDidZoom](https://developer.apple.com/documentation/uikit/uiscrollviewdelegate/1619409-scrollviewdidzoom))
|
///- iOS ([Official API - UIScrollViewDelegate.scrollViewDidZoom](https://developer.apple.com/documentation/uikit/uiscrollviewdelegate/1619409-scrollviewdidzoom))
|
||||||
///- Web
|
///- Web
|
||||||
@ -634,7 +634,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
T controller, Uri url, SafeBrowsingThreat? threatType)?
|
T controller, Uri url, SafeBrowsingThreat? threatType)?
|
||||||
androidOnSafeBrowsingHit;
|
androidOnSafeBrowsingHit;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onSafeBrowsingHit}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onSafeBrowsingHit}
|
||||||
///Event fired when the webview notifies that a loading URL has been flagged by Safe Browsing.
|
///Event fired when the webview notifies that a loading URL has been flagged by Safe Browsing.
|
||||||
///The default behavior is to show an interstitial to the user, with the reporting checkbox visible.
|
///The default behavior is to show an interstitial to the user, with the reporting checkbox visible.
|
||||||
///
|
///
|
||||||
@ -644,7 +644,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
///
|
///
|
||||||
///**NOTE**: available only on Android 27+.
|
///**NOTE**: available only on Android 27+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewClient.onSafeBrowsingHit](https://developer.android.com/reference/android/webkit/WebViewClient#onSafeBrowsingHit(android.webkit.WebView,%20android.webkit.WebResourceRequest,%20int,%20android.webkit.SafeBrowsingResponse)))
|
///- Android native WebView ([Official API - WebViewClient.onSafeBrowsingHit](https://developer.android.com/reference/android/webkit/WebViewClient#onSafeBrowsingHit(android.webkit.WebView,%20android.webkit.WebResourceRequest,%20int,%20android.webkit.SafeBrowsingResponse)))
|
||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
final Future<SafeBrowsingResponse?> Function(
|
final Future<SafeBrowsingResponse?> Function(
|
||||||
@ -657,7 +657,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
T controller, String origin, List<String> resources)?
|
T controller, String origin, List<String> resources)?
|
||||||
androidOnPermissionRequest;
|
androidOnPermissionRequest;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onPermissionRequest}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onPermissionRequest}
|
||||||
///Event fired when the WebView is requesting permission to access the specified resources and the permission currently isn't granted or denied.
|
///Event fired when the WebView is requesting permission to access the specified resources and the permission currently isn't granted or denied.
|
||||||
///
|
///
|
||||||
///[permissionRequest] represents the permission request with an array of resources the web content wants to access
|
///[permissionRequest] represents the permission request with an array of resources the web content wants to access
|
||||||
@ -669,7 +669,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
///
|
///
|
||||||
///**NOTE for MacOS**: available only on iOS 12.0+. The default [PermissionResponse.action] is [PermissionResponseAction.PROMPT].
|
///**NOTE for MacOS**: available only on iOS 12.0+. The default [PermissionResponse.action] is [PermissionResponseAction.PROMPT].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebChromeClient.onPermissionRequest](https://developer.android.com/reference/android/webkit/WebChromeClient#onPermissionRequest(android.webkit.PermissionRequest)))
|
///- Android native WebView ([Official API - WebChromeClient.onPermissionRequest](https://developer.android.com/reference/android/webkit/WebChromeClient#onPermissionRequest(android.webkit.PermissionRequest)))
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -682,14 +682,14 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
final Future<GeolocationPermissionShowPromptResponse?> Function(
|
final Future<GeolocationPermissionShowPromptResponse?> Function(
|
||||||
T controller, String origin)? androidOnGeolocationPermissionsShowPrompt;
|
T controller, String origin)? androidOnGeolocationPermissionsShowPrompt;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onGeolocationPermissionsShowPrompt}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onGeolocationPermissionsShowPrompt}
|
||||||
///Event that notifies the host application that web content from the specified origin is attempting to use the Geolocation API, but no permission state is currently set for that origin.
|
///Event that notifies the host application that web content from the specified origin is attempting to use the Geolocation API, but no permission state is currently set for that origin.
|
||||||
///Note that for applications targeting Android N and later SDKs (API level > `Build.VERSION_CODES.M`) this method is only called for requests originating from secure origins such as https.
|
///Note that for applications targeting Android N and later SDKs (API level > `Build.VERSION_CODES.M`) this method is only called for requests originating from secure origins such as https.
|
||||||
///On non-secure origins geolocation requests are automatically denied.
|
///On non-secure origins geolocation requests are automatically denied.
|
||||||
///
|
///
|
||||||
///[origin] represents the origin of the web content attempting to use the Geolocation API.
|
///[origin] represents the origin of the web content attempting to use the Geolocation API.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebChromeClient.onGeolocationPermissionsShowPrompt](https://developer.android.com/reference/android/webkit/WebChromeClient#onGeolocationPermissionsShowPrompt(java.lang.String,%20android.webkit.GeolocationPermissions.Callback)))
|
///- Android native WebView ([Official API - WebChromeClient.onGeolocationPermissionsShowPrompt](https://developer.android.com/reference/android/webkit/WebChromeClient#onGeolocationPermissionsShowPrompt(java.lang.String,%20android.webkit.GeolocationPermissions.Callback)))
|
||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
final Future<GeolocationPermissionShowPromptResponse?> Function(
|
final Future<GeolocationPermissionShowPromptResponse?> Function(
|
||||||
@ -699,11 +699,11 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
@Deprecated("Use onGeolocationPermissionsHidePrompt instead")
|
@Deprecated("Use onGeolocationPermissionsHidePrompt instead")
|
||||||
final void Function(T controller)? androidOnGeolocationPermissionsHidePrompt;
|
final void Function(T controller)? androidOnGeolocationPermissionsHidePrompt;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onGeolocationPermissionsHidePrompt}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onGeolocationPermissionsHidePrompt}
|
||||||
///Notify the host application that a request for Geolocation permissions, made with a previous call to [onGeolocationPermissionsShowPrompt] has been canceled.
|
///Notify the host application that a request for Geolocation permissions, made with a previous call to [onGeolocationPermissionsShowPrompt] has been canceled.
|
||||||
///Any related UI should therefore be hidden.
|
///Any related UI should therefore be hidden.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebChromeClient.onGeolocationPermissionsHidePrompt](https://developer.android.com/reference/android/webkit/WebChromeClient#onGeolocationPermissionsHidePrompt()))
|
///- Android native WebView ([Official API - WebChromeClient.onGeolocationPermissionsHidePrompt](https://developer.android.com/reference/android/webkit/WebChromeClient#onGeolocationPermissionsHidePrompt()))
|
||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
final void Function(T controller)? onGeolocationPermissionsHidePrompt;
|
final void Function(T controller)? onGeolocationPermissionsHidePrompt;
|
||||||
@ -713,7 +713,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
final Future<WebResourceResponse?> Function(
|
final Future<WebResourceResponse?> Function(
|
||||||
T controller, WebResourceRequest request)? androidShouldInterceptRequest;
|
T controller, WebResourceRequest request)? androidShouldInterceptRequest;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.shouldInterceptRequest}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.shouldInterceptRequest}
|
||||||
///Notify the host application of a resource request and allow the application to return the data.
|
///Notify the host application of a resource request and allow the application to return the data.
|
||||||
///If the return value is `null`, the WebView will continue to load the resource as usual.
|
///If the return value is `null`, the WebView will continue to load the resource as usual.
|
||||||
///Otherwise, the return response and data will be used.
|
///Otherwise, the return response and data will be used.
|
||||||
@ -728,7 +728,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
///
|
///
|
||||||
///**NOTE**: In order to be able to listen this event, you need to set [InAppWebViewSettings.useShouldInterceptRequest] option to `true`.
|
///**NOTE**: In order to be able to listen this event, you need to set [InAppWebViewSettings.useShouldInterceptRequest] option to `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewClient.shouldInterceptRequest](https://developer.android.com/reference/android/webkit/WebViewClient#shouldInterceptRequest(android.webkit.WebView,%20android.webkit.WebResourceRequest)))
|
///- Android native WebView ([Official API - WebViewClient.shouldInterceptRequest](https://developer.android.com/reference/android/webkit/WebViewClient#shouldInterceptRequest(android.webkit.WebView,%20android.webkit.WebResourceRequest)))
|
||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
final Future<WebResourceResponse?> Function(
|
final Future<WebResourceResponse?> Function(
|
||||||
@ -739,7 +739,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
final Future<WebViewRenderProcessAction?> Function(T controller, Uri? url)?
|
final Future<WebViewRenderProcessAction?> Function(T controller, Uri? url)?
|
||||||
androidOnRenderProcessUnresponsive;
|
androidOnRenderProcessUnresponsive;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onRenderProcessUnresponsive}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onRenderProcessUnresponsive}
|
||||||
///Event called when the renderer currently associated with the WebView becomes unresponsive as a result of a long running blocking task such as the execution of JavaScript.
|
///Event called when the renderer currently associated with the WebView becomes unresponsive as a result of a long running blocking task such as the execution of JavaScript.
|
||||||
///
|
///
|
||||||
///If a WebView fails to process an input event, or successfully navigate to a new URL within a reasonable time frame, the renderer is considered to be unresponsive, and this callback will be called.
|
///If a WebView fails to process an input event, or successfully navigate to a new URL within a reasonable time frame, the renderer is considered to be unresponsive, and this callback will be called.
|
||||||
@ -757,7 +757,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
///
|
///
|
||||||
///**NOTE**: available only on Android 29+.
|
///**NOTE**: available only on Android 29+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewRenderProcessClient.onRenderProcessUnresponsive](https://developer.android.com/reference/android/webkit/WebViewRenderProcessClient#onRenderProcessUnresponsive(android.webkit.WebView,%20android.webkit.WebViewRenderProcess)))
|
///- Android native WebView ([Official API - WebViewRenderProcessClient.onRenderProcessUnresponsive](https://developer.android.com/reference/android/webkit/WebViewRenderProcessClient#onRenderProcessUnresponsive(android.webkit.WebView,%20android.webkit.WebViewRenderProcess)))
|
||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
final Future<WebViewRenderProcessAction?> Function(T controller, WebUri? url)?
|
final Future<WebViewRenderProcessAction?> Function(T controller, WebUri? url)?
|
||||||
@ -768,7 +768,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
final Future<WebViewRenderProcessAction?> Function(T controller, Uri? url)?
|
final Future<WebViewRenderProcessAction?> Function(T controller, Uri? url)?
|
||||||
androidOnRenderProcessResponsive;
|
androidOnRenderProcessResponsive;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onRenderProcessResponsive}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onRenderProcessResponsive}
|
||||||
///Event called once when an unresponsive renderer currently associated with the WebView becomes responsive.
|
///Event called once when an unresponsive renderer currently associated with the WebView becomes responsive.
|
||||||
///
|
///
|
||||||
///After a WebView renderer becomes unresponsive, which is notified to the application by [onRenderProcessUnresponsive],
|
///After a WebView renderer becomes unresponsive, which is notified to the application by [onRenderProcessUnresponsive],
|
||||||
@ -779,7 +779,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
///
|
///
|
||||||
///**NOTE**: available only on Android 29+.
|
///**NOTE**: available only on Android 29+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewRenderProcessClient.onRenderProcessResponsive](https://developer.android.com/reference/android/webkit/WebViewRenderProcessClient#onRenderProcessResponsive(android.webkit.WebView,%20android.webkit.WebViewRenderProcess)))
|
///- Android native WebView ([Official API - WebViewRenderProcessClient.onRenderProcessResponsive](https://developer.android.com/reference/android/webkit/WebViewRenderProcessClient#onRenderProcessResponsive(android.webkit.WebView,%20android.webkit.WebViewRenderProcess)))
|
||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
final Future<WebViewRenderProcessAction?> Function(T controller, WebUri? url)?
|
final Future<WebViewRenderProcessAction?> Function(T controller, WebUri? url)?
|
||||||
@ -790,7 +790,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
final void Function(T controller, RenderProcessGoneDetail detail)?
|
final void Function(T controller, RenderProcessGoneDetail detail)?
|
||||||
androidOnRenderProcessGone;
|
androidOnRenderProcessGone;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onRenderProcessGone}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onRenderProcessGone}
|
||||||
///Event fired when the given WebView's render process has exited.
|
///Event fired when the given WebView's render process has exited.
|
||||||
///The application's implementation of this callback should only attempt to clean up the WebView.
|
///The application's implementation of this callback should only attempt to clean up the WebView.
|
||||||
///The WebView should be removed from the view hierarchy, all references to it should be cleaned up.
|
///The WebView should be removed from the view hierarchy, all references to it should be cleaned up.
|
||||||
@ -799,7 +799,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
///
|
///
|
||||||
///**NOTE**: available only on Android 26+.
|
///**NOTE**: available only on Android 26+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewClient.onRenderProcessGone](https://developer.android.com/reference/android/webkit/WebViewClient#onRenderProcessGone(android.webkit.WebView,%20android.webkit.RenderProcessGoneDetail)))
|
///- Android native WebView ([Official API - WebViewClient.onRenderProcessGone](https://developer.android.com/reference/android/webkit/WebViewClient#onRenderProcessGone(android.webkit.WebView,%20android.webkit.RenderProcessGoneDetail)))
|
||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
final void Function(T controller, RenderProcessGoneDetail detail)?
|
final void Function(T controller, RenderProcessGoneDetail detail)?
|
||||||
@ -810,10 +810,10 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
final Future<FormResubmissionAction?> Function(T controller, Uri? url)?
|
final Future<FormResubmissionAction?> Function(T controller, Uri? url)?
|
||||||
androidOnFormResubmission;
|
androidOnFormResubmission;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onFormResubmission}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onFormResubmission}
|
||||||
///As the host application if the browser should resend data as the requested page was a result of a POST. The default is to not resend the data.
|
///As the host application if the browser should resend data as the requested page was a result of a POST. The default is to not resend the data.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewClient.onFormResubmission](https://developer.android.com/reference/android/webkit/WebViewClient#onFormResubmission(android.webkit.WebView,%20android.os.Message,%20android.os.Message)))
|
///- Android native WebView ([Official API - WebViewClient.onFormResubmission](https://developer.android.com/reference/android/webkit/WebViewClient#onFormResubmission(android.webkit.WebView,%20android.os.Message,%20android.os.Message)))
|
||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
final Future<FormResubmissionAction?> Function(T controller, WebUri? url)?
|
final Future<FormResubmissionAction?> Function(T controller, WebUri? url)?
|
||||||
@ -828,12 +828,12 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
@Deprecated('Use onReceivedIcon instead')
|
@Deprecated('Use onReceivedIcon instead')
|
||||||
final void Function(T controller, Uint8List icon)? androidOnReceivedIcon;
|
final void Function(T controller, Uint8List icon)? androidOnReceivedIcon;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onReceivedIcon}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onReceivedIcon}
|
||||||
///Event fired when there is new favicon for the current page.
|
///Event fired when there is new favicon for the current page.
|
||||||
///
|
///
|
||||||
///[icon] represents the favicon for the current page.
|
///[icon] represents the favicon for the current page.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebChromeClient.onReceivedIcon](https://developer.android.com/reference/android/webkit/WebChromeClient#onReceivedIcon(android.webkit.WebView,%20android.graphics.Bitmap)))
|
///- Android native WebView ([Official API - WebChromeClient.onReceivedIcon](https://developer.android.com/reference/android/webkit/WebChromeClient#onReceivedIcon(android.webkit.WebView,%20android.graphics.Bitmap)))
|
||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
final void Function(T controller, Uint8List icon)? onReceivedIcon;
|
final void Function(T controller, Uint8List icon)? onReceivedIcon;
|
||||||
@ -843,14 +843,14 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
final void Function(T controller, Uri url, bool precomposed)?
|
final void Function(T controller, Uri url, bool precomposed)?
|
||||||
androidOnReceivedTouchIconUrl;
|
androidOnReceivedTouchIconUrl;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onReceivedTouchIconUrl}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onReceivedTouchIconUrl}
|
||||||
///Event fired when there is an url for an apple-touch-icon.
|
///Event fired when there is an url for an apple-touch-icon.
|
||||||
///
|
///
|
||||||
///[url] represents the icon url.
|
///[url] represents the icon url.
|
||||||
///
|
///
|
||||||
///[precomposed] is `true` if the url is for a precomposed touch icon.
|
///[precomposed] is `true` if the url is for a precomposed touch icon.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebChromeClient.onReceivedTouchIconUrl](https://developer.android.com/reference/android/webkit/WebChromeClient#onReceivedTouchIconUrl(android.webkit.WebView,%20java.lang.String,%20boolean)))
|
///- Android native WebView ([Official API - WebChromeClient.onReceivedTouchIconUrl](https://developer.android.com/reference/android/webkit/WebChromeClient#onReceivedTouchIconUrl(android.webkit.WebView,%20java.lang.String,%20boolean)))
|
||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
final void Function(T controller, WebUri url, bool precomposed)?
|
final void Function(T controller, WebUri url, bool precomposed)?
|
||||||
@ -862,7 +862,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
T controller, JsBeforeUnloadRequest jsBeforeUnloadRequest)?
|
T controller, JsBeforeUnloadRequest jsBeforeUnloadRequest)?
|
||||||
androidOnJsBeforeUnload;
|
androidOnJsBeforeUnload;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onJsBeforeUnload}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onJsBeforeUnload}
|
||||||
///Event fired when the client should display a dialog to confirm navigation away from the current page.
|
///Event fired when the client should display a dialog to confirm navigation away from the current page.
|
||||||
///This is the result of the `onbeforeunload` javascript event.
|
///This is the result of the `onbeforeunload` javascript event.
|
||||||
///If [JsBeforeUnloadResponse.handledByClient] is `true`, WebView will assume that the client will handle the confirm dialog.
|
///If [JsBeforeUnloadResponse.handledByClient] is `true`, WebView will assume that the client will handle the confirm dialog.
|
||||||
@ -873,7 +873,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
///
|
///
|
||||||
///[jsBeforeUnloadRequest] contains the message to be displayed in the alert dialog and the of the page requesting the dialog.
|
///[jsBeforeUnloadRequest] contains the message to be displayed in the alert dialog and the of the page requesting the dialog.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebChromeClient.onJsBeforeUnload](https://developer.android.com/reference/android/webkit/WebChromeClient#onJsBeforeUnload(android.webkit.WebView,%20java.lang.String,%20java.lang.String,%20android.webkit.JsResult)))
|
///- Android native WebView ([Official API - WebChromeClient.onJsBeforeUnload](https://developer.android.com/reference/android/webkit/WebChromeClient#onJsBeforeUnload(android.webkit.WebView,%20java.lang.String,%20java.lang.String,%20android.webkit.JsResult)))
|
||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
final Future<JsBeforeUnloadResponse?> Function(
|
final Future<JsBeforeUnloadResponse?> Function(
|
||||||
@ -885,18 +885,18 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
final void Function(T controller, LoginRequest loginRequest)?
|
final void Function(T controller, LoginRequest loginRequest)?
|
||||||
androidOnReceivedLoginRequest;
|
androidOnReceivedLoginRequest;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onReceivedLoginRequest}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onReceivedLoginRequest}
|
||||||
///Event fired when a request to automatically log in the user has been processed.
|
///Event fired when a request to automatically log in the user has been processed.
|
||||||
///
|
///
|
||||||
///[loginRequest] contains the realm, account and args of the login request.
|
///[loginRequest] contains the realm, account and args of the login request.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewClient.onReceivedLoginRequest](https://developer.android.com/reference/android/webkit/WebViewClient#onReceivedLoginRequest(android.webkit.WebView,%20java.lang.String,%20java.lang.String,%20java.lang.String)))
|
///- Android native WebView ([Official API - WebViewClient.onReceivedLoginRequest](https://developer.android.com/reference/android/webkit/WebViewClient#onReceivedLoginRequest(android.webkit.WebView,%20java.lang.String,%20java.lang.String,%20java.lang.String)))
|
||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
final void Function(T controller, LoginRequest loginRequest)?
|
final void Function(T controller, LoginRequest loginRequest)?
|
||||||
onReceivedLoginRequest;
|
onReceivedLoginRequest;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onPermissionRequestCanceled}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onPermissionRequestCanceled}
|
||||||
///Notify the host application that the given permission request has been canceled. Any related UI should therefore be hidden.
|
///Notify the host application that the given permission request has been canceled. Any related UI should therefore be hidden.
|
||||||
///
|
///
|
||||||
///[permissionRequest] represents the permission request that needs be canceled
|
///[permissionRequest] represents the permission request that needs be canceled
|
||||||
@ -905,17 +905,17 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
///
|
///
|
||||||
///**NOTE for Android**: available only on Android 21+.
|
///**NOTE for Android**: available only on Android 21+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebChromeClient.onPermissionRequestCanceled](https://developer.android.com/reference/android/webkit/WebChromeClient#onPermissionRequestCanceled(android.webkit.PermissionRequest)))
|
///- Android native WebView ([Official API - WebChromeClient.onPermissionRequestCanceled](https://developer.android.com/reference/android/webkit/WebChromeClient#onPermissionRequestCanceled(android.webkit.PermissionRequest)))
|
||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
final void Function(T controller, PermissionRequest permissionRequest)?
|
final void Function(T controller, PermissionRequest permissionRequest)?
|
||||||
onPermissionRequestCanceled;
|
onPermissionRequestCanceled;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onRequestFocus}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onRequestFocus}
|
||||||
///Request display and focus for this WebView.
|
///Request display and focus for this WebView.
|
||||||
///This may happen due to another WebView opening a link in this WebView and requesting that this WebView be displayed.
|
///This may happen due to another WebView opening a link in this WebView and requesting that this WebView be displayed.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebChromeClient.onRequestFocus](https://developer.android.com/reference/android/webkit/WebChromeClient#onRequestFocus(android.webkit.WebView)))
|
///- Android native WebView ([Official API - WebChromeClient.onRequestFocus](https://developer.android.com/reference/android/webkit/WebChromeClient#onRequestFocus(android.webkit.WebView)))
|
||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
final void Function(T controller)? onRequestFocus;
|
final void Function(T controller)? onRequestFocus;
|
||||||
@ -924,10 +924,10 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
@Deprecated('Use onWebContentProcessDidTerminate instead')
|
@Deprecated('Use onWebContentProcessDidTerminate instead')
|
||||||
final void Function(T controller)? iosOnWebContentProcessDidTerminate;
|
final void Function(T controller)? iosOnWebContentProcessDidTerminate;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onWebContentProcessDidTerminate}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onWebContentProcessDidTerminate}
|
||||||
///Invoked when the web view's web content process is terminated.
|
///Invoked when the web view's web content process is terminated.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - WKNavigationDelegate.webViewWebContentProcessDidTerminate](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455639-webviewwebcontentprocessdidtermi))
|
///- iOS ([Official API - WKNavigationDelegate.webViewWebContentProcessDidTerminate](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455639-webviewwebcontentprocessdidtermi))
|
||||||
///- MacOS ([Official API - WKNavigationDelegate.webViewWebContentProcessDidTerminate](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455639-webviewwebcontentprocessdidtermi))
|
///- MacOS ([Official API - WKNavigationDelegate.webViewWebContentProcessDidTerminate](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455639-webviewwebcontentprocessdidtermi))
|
||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
@ -938,10 +938,10 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
final void Function(T controller)?
|
final void Function(T controller)?
|
||||||
iosOnDidReceiveServerRedirectForProvisionalNavigation;
|
iosOnDidReceiveServerRedirectForProvisionalNavigation;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onDidReceiveServerRedirectForProvisionalNavigation}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onDidReceiveServerRedirectForProvisionalNavigation}
|
||||||
///Called when a web view receives a server redirect.
|
///Called when a web view receives a server redirect.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455627-webview))
|
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455627-webview))
|
||||||
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455627-webview))
|
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455627-webview))
|
||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
@ -954,14 +954,14 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
T controller, IOSWKNavigationResponse navigationResponse)?
|
T controller, IOSWKNavigationResponse navigationResponse)?
|
||||||
iosOnNavigationResponse;
|
iosOnNavigationResponse;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onNavigationResponse}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onNavigationResponse}
|
||||||
///Called when a web view asks for permission to navigate to new content after the response to the navigation request is known.
|
///Called when a web view asks for permission to navigate to new content after the response to the navigation request is known.
|
||||||
///
|
///
|
||||||
///[navigationResponse] represents the navigation response.
|
///[navigationResponse] represents the navigation response.
|
||||||
///
|
///
|
||||||
///**NOTE**: In order to be able to listen this event, you need to set [InAppWebViewSettings.useOnNavigationResponse] setting to `true`.
|
///**NOTE**: In order to be able to listen this event, you need to set [InAppWebViewSettings.useOnNavigationResponse] setting to `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455643-webview))
|
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455643-webview))
|
||||||
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455643-webview))
|
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455643-webview))
|
||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
@ -975,7 +975,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
T controller, URLAuthenticationChallenge challenge)?
|
T controller, URLAuthenticationChallenge challenge)?
|
||||||
iosShouldAllowDeprecatedTLS;
|
iosShouldAllowDeprecatedTLS;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.shouldAllowDeprecatedTLS}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.shouldAllowDeprecatedTLS}
|
||||||
///Called when a web view asks whether to continue with a connection that uses a deprecated version of TLS (v1.0 and v1.1).
|
///Called when a web view asks whether to continue with a connection that uses a deprecated version of TLS (v1.0 and v1.1).
|
||||||
///
|
///
|
||||||
///[challenge] represents the authentication challenge.
|
///[challenge] represents the authentication challenge.
|
||||||
@ -984,7 +984,7 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
///
|
///
|
||||||
///**NOTE for MacOS**: available only on MacOS 11.0+.
|
///**NOTE for MacOS**: available only on MacOS 11.0+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/3601237-webview))
|
///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/3601237-webview))
|
||||||
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/3601237-webview))
|
///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/3601237-webview))
|
||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
@ -992,14 +992,14 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
T controller, URLAuthenticationChallenge challenge)?
|
T controller, URLAuthenticationChallenge challenge)?
|
||||||
shouldAllowDeprecatedTLS;
|
shouldAllowDeprecatedTLS;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onCameraCaptureStateChanged}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onCameraCaptureStateChanged}
|
||||||
///Event fired when a change in the camera capture state occurred.
|
///Event fired when a change in the camera capture state occurred.
|
||||||
///
|
///
|
||||||
///**NOTE for iOS**: available only on iOS 15.0+.
|
///**NOTE for iOS**: available only on iOS 15.0+.
|
||||||
///
|
///
|
||||||
///**NOTE for MacOS**: available only on MacOS 12.0+.
|
///**NOTE for MacOS**: available only on MacOS 12.0+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
@ -1009,14 +1009,14 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
MediaCaptureState? newState,
|
MediaCaptureState? newState,
|
||||||
)? onCameraCaptureStateChanged;
|
)? onCameraCaptureStateChanged;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onMicrophoneCaptureStateChanged}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onMicrophoneCaptureStateChanged}
|
||||||
///Event fired when a change in the microphone capture state occurred.
|
///Event fired when a change in the microphone capture state occurred.
|
||||||
///
|
///
|
||||||
///**NOTE for iOS**: available only on iOS 15.0+.
|
///**NOTE for iOS**: available only on iOS 15.0+.
|
||||||
///
|
///
|
||||||
///**NOTE for MacOS**: available only on MacOS 12.0+.
|
///**NOTE for MacOS**: available only on MacOS 12.0+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
@ -1026,25 +1026,25 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
MediaCaptureState? newState,
|
MediaCaptureState? newState,
|
||||||
)? onMicrophoneCaptureStateChanged;
|
)? onMicrophoneCaptureStateChanged;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.onContentSizeChanged}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.onContentSizeChanged}
|
||||||
///Event fired when the content size of the `WebView` changes.
|
///Event fired when the content size of the `WebView` changes.
|
||||||
///
|
///
|
||||||
///[oldContentSize] represents the old content size value.
|
///[oldContentSize] represents the old content size value.
|
||||||
///
|
///
|
||||||
///[newContentSize] represents the new content size value.
|
///[newContentSize] represents the new content size value.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
final void Function(T controller, Size oldContentSize, Size newContentSize)?
|
final void Function(T controller, Size oldContentSize, Size newContentSize)?
|
||||||
onContentSizeChanged;
|
onContentSizeChanged;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.initialUrlRequest}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.initialUrlRequest}
|
||||||
///Initial url request that will be loaded.
|
///Initial url request that will be loaded.
|
||||||
///
|
///
|
||||||
///**NOTE for Android**: when loading an URL Request using "POST" method, headers are ignored.
|
///**NOTE for Android**: when loading an URL Request using "POST" method, headers are ignored.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -1052,10 +1052,10 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
final URLRequest? initialUrlRequest;
|
final URLRequest? initialUrlRequest;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.initialFile}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.initialFile}
|
||||||
///Initial asset file that will be loaded. See [InAppWebViewController.loadFile] for explanation.
|
///Initial asset file that will be loaded. See [InAppWebViewController.loadFile] for explanation.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -1063,10 +1063,10 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
final String? initialFile;
|
final String? initialFile;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.initialData}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.initialData}
|
||||||
///Initial [InAppWebViewInitialData] that will be loaded.
|
///Initial [InAppWebViewInitialData] that will be loaded.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -1078,10 +1078,10 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
@Deprecated('Use initialSettings instead')
|
@Deprecated('Use initialSettings instead')
|
||||||
final InAppWebViewGroupOptions? initialOptions;
|
final InAppWebViewGroupOptions? initialOptions;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.initialSettings}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.initialSettings}
|
||||||
///Initial settings that will be used.
|
///Initial settings that will be used.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -1089,53 +1089,53 @@ class PlatformWebViewCreationParams<T> {
|
|||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
final InAppWebViewSettings? initialSettings;
|
final InAppWebViewSettings? initialSettings;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.contextMenu}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.contextMenu}
|
||||||
///Context menu which contains custom menu items to be shown when [ContextMenu] is presented.
|
///Context menu which contains custom menu items to be shown when [ContextMenu] is presented.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
final ContextMenu? contextMenu;
|
final ContextMenu? contextMenu;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.initialUserScripts}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.initialUserScripts}
|
||||||
///Initial list of user scripts to be loaded at start or end of a page loading.
|
///Initial list of user scripts to be loaded at start or end of a page loading.
|
||||||
///To add or remove user scripts, you have to use the [InAppWebViewController]'s methods such as [InAppWebViewController.addUserScript],
|
///To add or remove user scripts, you have to use the [InAppWebViewController]'s methods such as [InAppWebViewController.addUserScript],
|
||||||
///[InAppWebViewController.removeUserScript], [InAppWebViewController.removeAllUserScripts], etc.
|
///[InAppWebViewController.removeUserScript], [InAppWebViewController.removeAllUserScripts], etc.
|
||||||
///
|
///
|
||||||
///**NOTE for iOS**: this property will be ignored if the [WebView.windowId] has been set.
|
///**NOTE for iOS**: this property will be ignored if the [PlatformWebViewCreationParams.windowId] has been set.
|
||||||
///There isn't any way to add/remove user scripts specific to iOS window WebViews.
|
///There isn't any way to add/remove user scripts specific to iOS window WebViews.
|
||||||
///This is a limitation of the native iOS WebKit APIs.
|
///This is a limitation of the native iOS WebKit APIs.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
final UnmodifiableListView<UserScript>? initialUserScripts;
|
final UnmodifiableListView<UserScript>? initialUserScripts;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.pullToRefreshController}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.pullToRefreshController}
|
||||||
///Represents the pull-to-refresh feature controller.
|
///Represents the pull-to-refresh feature controller.
|
||||||
///
|
///
|
||||||
///**NOTE for Android**: to be able to use the "pull-to-refresh" feature, [InAppWebViewSettings.useHybridComposition] must be `true`.
|
///**NOTE for Android**: to be able to use the "pull-to-refresh" feature, [InAppWebViewSettings.useHybridComposition] must be `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
final PlatformPullToRefreshController? pullToRefreshController;
|
final PlatformPullToRefreshController? pullToRefreshController;
|
||||||
|
|
||||||
///{@template flutter_inappwebview.WebView.findInteractionController}
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewCreationParams.findInteractionController}
|
||||||
///Represents the find interaction feature controller.
|
///Represents the find interaction feature controller.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
final PlatformFindInteractionController? findInteractionController;
|
final PlatformFindInteractionController? findInteractionController;
|
||||||
|
|
||||||
///{@macro flutter_inappwebview.WebView}
|
///{@macro flutter_inappwebview_platform_interface.PlatformWebViewCreationParams}
|
||||||
const PlatformWebViewCreationParams(
|
const PlatformWebViewCreationParams(
|
||||||
{this.controllerFromPlatform,
|
{this.controllerFromPlatform,
|
||||||
this.windowId,
|
this.windowId,
|
||||||
|
@ -7,6 +7,7 @@ import 'in_app_webview/platform_inappwebview_controller.dart';
|
|||||||
import 'types/main.dart';
|
import 'types/main.dart';
|
||||||
import 'web_uri.dart';
|
import 'web_uri.dart';
|
||||||
import 'inappwebview_platform.dart';
|
import 'inappwebview_platform.dart';
|
||||||
|
import 'in_app_webview/platform_headless_in_app_webview.dart';
|
||||||
|
|
||||||
/// Object specifying creation parameters for creating a [PlatformCookieManager].
|
/// Object specifying creation parameters for creating a [PlatformCookieManager].
|
||||||
///
|
///
|
||||||
@ -18,6 +19,7 @@ class PlatformCookieManagerCreationParams {
|
|||||||
const PlatformCookieManagerCreationParams();
|
const PlatformCookieManagerCreationParams();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformCookieManager}
|
||||||
///Class that implements a singleton object (shared instance) which manages the cookies used by WebView instances.
|
///Class that implements a singleton object (shared instance) which manages the cookies used by WebView instances.
|
||||||
///On Android, it is implemented using [CookieManager](https://developer.android.com/reference/android/webkit/CookieManager).
|
///On Android, it is implemented using [CookieManager](https://developer.android.com/reference/android/webkit/CookieManager).
|
||||||
///On iOS, it is implemented using [WKHTTPCookieStore](https://developer.apple.com/documentation/webkit/wkhttpcookiestore).
|
///On iOS, it is implemented using [WKHTTPCookieStore](https://developer.apple.com/documentation/webkit/wkhttpcookiestore).
|
||||||
@ -26,11 +28,12 @@ class PlatformCookieManagerCreationParams {
|
|||||||
///has been implemented using JavaScript because there is no other way to work with them on iOS below 11.0.
|
///has been implemented using JavaScript because there is no other way to work with them on iOS below 11.0.
|
||||||
///See https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies for JavaScript restrictions.
|
///See https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies for JavaScript restrictions.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
///- Web
|
///- Web
|
||||||
|
///{@endtemplate}
|
||||||
abstract class PlatformCookieManager extends PlatformInterface {
|
abstract class PlatformCookieManager extends PlatformInterface {
|
||||||
/// Creates a new [PlatformCookieManager]
|
/// Creates a new [PlatformCookieManager]
|
||||||
factory PlatformCookieManager(PlatformCookieManagerCreationParams params) {
|
factory PlatformCookieManager(PlatformCookieManagerCreationParams params) {
|
||||||
@ -60,6 +63,7 @@ abstract class PlatformCookieManager extends PlatformInterface {
|
|||||||
/// The parameters used to initialize the [PlatformCookieManager].
|
/// The parameters used to initialize the [PlatformCookieManager].
|
||||||
final PlatformCookieManagerCreationParams params;
|
final PlatformCookieManagerCreationParams params;
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformCookieManager.setCookie}
|
||||||
///Sets a cookie for the given [url]. Any existing cookie with the same [host], [path] and [name] will be replaced with the new cookie.
|
///Sets a cookie for the given [url]. Any existing cookie with the same [host], [path] and [name] will be replaced with the new cookie.
|
||||||
///The cookie being set will be ignored if it is expired.
|
///The cookie being set will be ignored if it is expired.
|
||||||
///
|
///
|
||||||
@ -71,18 +75,19 @@ abstract class PlatformCookieManager extends PlatformInterface {
|
|||||||
///The return value indicates whether the cookie was set successfully.
|
///The return value indicates whether the cookie was set successfully.
|
||||||
///Note that it will return always `true` for Web platform, iOS below 11.0 and MacOS below 10.13.
|
///Note that it will return always `true` for Web platform, iOS below 11.0 and MacOS below 10.13.
|
||||||
///
|
///
|
||||||
///**NOTE for iOS below 11.0 and MacOS below 10.13**: If [webViewController] is `null` or JavaScript is disabled for it, it will try to use a [HeadlessInAppWebView]
|
///**NOTE for iOS below 11.0 and MacOS below 10.13**: If [webViewController] is `null` or JavaScript is disabled for it, it will try to use a [PlatformHeadlessInAppWebView]
|
||||||
///to set the cookie (session-only cookie won't work! In that case, you should set also [expiresDate] or [maxAge]).
|
///to set the cookie (session-only cookie won't work! In that case, you should set also [expiresDate] or [maxAge]).
|
||||||
///
|
///
|
||||||
///**NOTE for Web**: this method will have effect only if the iframe has the same origin.
|
///**NOTE for Web**: this method will have effect only if the iframe has the same origin.
|
||||||
///If [webViewController] is `null` or JavaScript is disabled for it, it will try to use a [HeadlessInAppWebView]
|
///If [webViewController] is `null` or JavaScript is disabled for it, it will try to use a [PlatformHeadlessInAppWebView]
|
||||||
///to set the cookie (session-only cookie won't work! In that case, you should set also [expiresDate] or [maxAge]).
|
///to set the cookie (session-only cookie won't work! In that case, you should set also [expiresDate] or [maxAge]).
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - CookieManager.setCookie](https://developer.android.com/reference/android/webkit/CookieManager#setCookie(java.lang.String,%20java.lang.String,%20android.webkit.ValueCallback%3Cjava.lang.Boolean%3E)))
|
///- Android native WebView ([Official API - CookieManager.setCookie](https://developer.android.com/reference/android/webkit/CookieManager#setCookie(java.lang.String,%20java.lang.String,%20android.webkit.ValueCallback%3Cjava.lang.Boolean%3E)))
|
||||||
///- iOS ([Official API - WKHTTPCookieStore.setCookie](https://developer.apple.com/documentation/webkit/wkhttpcookiestore/2882007-setcookie))
|
///- iOS ([Official API - WKHTTPCookieStore.setCookie](https://developer.apple.com/documentation/webkit/wkhttpcookiestore/2882007-setcookie))
|
||||||
///- MacOS ([Official API - WKHTTPCookieStore.setCookie](https://developer.apple.com/documentation/webkit/wkhttpcookiestore/2882007-setcookie))
|
///- MacOS ([Official API - WKHTTPCookieStore.setCookie](https://developer.apple.com/documentation/webkit/wkhttpcookiestore/2882007-setcookie))
|
||||||
///- Web
|
///- Web
|
||||||
|
///{@endtemplate}
|
||||||
Future<bool> setCookie(
|
Future<bool> setCookie(
|
||||||
{required WebUri url,
|
{required WebUri url,
|
||||||
required String name,
|
required String name,
|
||||||
@ -101,6 +106,7 @@ abstract class PlatformCookieManager extends PlatformInterface {
|
|||||||
'setCookie is not implemented on the current platform');
|
'setCookie is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformCookieManager.getCookies}
|
||||||
///Gets all the cookies for the given [url].
|
///Gets all the cookies for the given [url].
|
||||||
///
|
///
|
||||||
///[webViewController] is used for getting the cookies (also session-only cookies) using JavaScript (cookies with `isHttpOnly` enabled cannot be found, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies)
|
///[webViewController] is used for getting the cookies (also session-only cookies) using JavaScript (cookies with `isHttpOnly` enabled cannot be found, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies)
|
||||||
@ -108,18 +114,19 @@ abstract class PlatformCookieManager extends PlatformInterface {
|
|||||||
///In this case the [url] parameter is ignored.
|
///In this case the [url] parameter is ignored.
|
||||||
///
|
///
|
||||||
///**NOTE for iOS below 11.0 and MacOS below 10.13**: All the cookies returned this way will have all the properties to `null` except for [Cookie.name] and [Cookie.value].
|
///**NOTE for iOS below 11.0 and MacOS below 10.13**: All the cookies returned this way will have all the properties to `null` except for [Cookie.name] and [Cookie.value].
|
||||||
///If [webViewController] is `null` or JavaScript is disabled for it, it will try to use a [HeadlessInAppWebView]
|
///If [webViewController] is `null` or JavaScript is disabled for it, it will try to use a [PlatformHeadlessInAppWebView]
|
||||||
///to get the cookies (session-only cookies and cookies with `isHttpOnly` enabled won't be found!).
|
///to get the cookies (session-only cookies and cookies with `isHttpOnly` enabled won't be found!).
|
||||||
///
|
///
|
||||||
///**NOTE for Web**: this method will have effect only if the iframe has the same origin.
|
///**NOTE for Web**: this method will have effect only if the iframe has the same origin.
|
||||||
///If [webViewController] is `null` or JavaScript is disabled for it, it will try to use a [HeadlessInAppWebView]
|
///If [webViewController] is `null` or JavaScript is disabled for it, it will try to use a [PlatformHeadlessInAppWebView]
|
||||||
///to get the cookies (session-only cookies and cookies with `isHttpOnly` enabled won't be found!).
|
///to get the cookies (session-only cookies and cookies with `isHttpOnly` enabled won't be found!).
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - CookieManager.getCookie](https://developer.android.com/reference/android/webkit/CookieManager#getCookie(java.lang.String)))
|
///- Android native WebView ([Official API - CookieManager.getCookie](https://developer.android.com/reference/android/webkit/CookieManager#getCookie(java.lang.String)))
|
||||||
///- iOS ([Official API - WKHTTPCookieStore.getAllCookies](https://developer.apple.com/documentation/webkit/wkhttpcookiestore/2882005-getallcookies))
|
///- iOS ([Official API - WKHTTPCookieStore.getAllCookies](https://developer.apple.com/documentation/webkit/wkhttpcookiestore/2882005-getallcookies))
|
||||||
///- MacOS ([Official API - WKHTTPCookieStore.getAllCookies](https://developer.apple.com/documentation/webkit/wkhttpcookiestore/2882005-getallcookies))
|
///- MacOS ([Official API - WKHTTPCookieStore.getAllCookies](https://developer.apple.com/documentation/webkit/wkhttpcookiestore/2882005-getallcookies))
|
||||||
///- Web
|
///- Web
|
||||||
|
///{@endtemplate}
|
||||||
Future<List<Cookie>> getCookies(
|
Future<List<Cookie>> getCookies(
|
||||||
{required WebUri url,
|
{required WebUri url,
|
||||||
@Deprecated("Use webViewController instead")
|
@Deprecated("Use webViewController instead")
|
||||||
@ -129,6 +136,7 @@ abstract class PlatformCookieManager extends PlatformInterface {
|
|||||||
'getCookies is not implemented on the current platform');
|
'getCookies is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformCookieManager.getCookie}
|
||||||
///Gets a cookie by its [name] for the given [url].
|
///Gets a cookie by its [name] for the given [url].
|
||||||
///
|
///
|
||||||
///[webViewController] is used for getting the cookie (also session-only cookie) using JavaScript (cookie with `isHttpOnly` enabled cannot be found, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies)
|
///[webViewController] is used for getting the cookie (also session-only cookie) using JavaScript (cookie with `isHttpOnly` enabled cannot be found, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies)
|
||||||
@ -136,18 +144,19 @@ abstract class PlatformCookieManager extends PlatformInterface {
|
|||||||
///In this case the [url] parameter is ignored.
|
///In this case the [url] parameter is ignored.
|
||||||
///
|
///
|
||||||
///**NOTE for iOS below 11.0 and MacOS below 10.13**: All the cookies returned this way will have all the properties to `null` except for [Cookie.name] and [Cookie.value].
|
///**NOTE for iOS below 11.0 and MacOS below 10.13**: All the cookies returned this way will have all the properties to `null` except for [Cookie.name] and [Cookie.value].
|
||||||
///If [webViewController] is `null` or JavaScript is disabled for it, it will try to use a [HeadlessInAppWebView]
|
///If [webViewController] is `null` or JavaScript is disabled for it, it will try to use a [PlatformHeadlessInAppWebView]
|
||||||
///to get the cookie (session-only cookie and cookie with `isHttpOnly` enabled won't be found!).
|
///to get the cookie (session-only cookie and cookie with `isHttpOnly` enabled won't be found!).
|
||||||
///
|
///
|
||||||
///**NOTE for Web**: this method will have effect only if the iframe has the same origin.
|
///**NOTE for Web**: this method will have effect only if the iframe has the same origin.
|
||||||
///If [webViewController] is `null` or JavaScript is disabled for it, it will try to use a [HeadlessInAppWebView]
|
///If [webViewController] is `null` or JavaScript is disabled for it, it will try to use a [PlatformHeadlessInAppWebView]
|
||||||
///to get the cookie (session-only cookie and cookie with `isHttpOnly` enabled won't be found!).
|
///to get the cookie (session-only cookie and cookie with `isHttpOnly` enabled won't be found!).
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
///- Web
|
///- Web
|
||||||
|
///{@endtemplate}
|
||||||
Future<Cookie?> getCookie(
|
Future<Cookie?> getCookie(
|
||||||
{required WebUri url,
|
{required WebUri url,
|
||||||
required String name,
|
required String name,
|
||||||
@ -158,6 +167,7 @@ abstract class PlatformCookieManager extends PlatformInterface {
|
|||||||
'getCookie is not implemented on the current platform');
|
'getCookie is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformCookieManager.deleteCookie}
|
||||||
///Removes a cookie by its [name] for the given [url], [domain] and [path].
|
///Removes a cookie by its [name] for the given [url], [domain] and [path].
|
||||||
///
|
///
|
||||||
///The default value of [path] is `"/"`.
|
///The default value of [path] is `"/"`.
|
||||||
@ -166,18 +176,19 @@ abstract class PlatformCookieManager extends PlatformInterface {
|
|||||||
///from the current context of the `WebView` managed by that controller when you need to target iOS below 11, MacOS below 10.13 and Web platform. JavaScript must be enabled in order to work.
|
///from the current context of the `WebView` managed by that controller when you need to target iOS below 11, MacOS below 10.13 and Web platform. JavaScript must be enabled in order to work.
|
||||||
///In this case the [url] parameter is ignored.
|
///In this case the [url] parameter is ignored.
|
||||||
///
|
///
|
||||||
///**NOTE for iOS below 11.0 and MacOS below 10.13**: If [webViewController] is `null` or JavaScript is disabled for it, it will try to use a [HeadlessInAppWebView]
|
///**NOTE for iOS below 11.0 and MacOS below 10.13**: If [webViewController] is `null` or JavaScript is disabled for it, it will try to use a [PlatformHeadlessInAppWebView]
|
||||||
///to delete the cookie (session-only cookie and cookie with `isHttpOnly` enabled won't be deleted!).
|
///to delete the cookie (session-only cookie and cookie with `isHttpOnly` enabled won't be deleted!).
|
||||||
///
|
///
|
||||||
///**NOTE for Web**: this method will have effect only if the iframe has the same origin.
|
///**NOTE for Web**: this method will have effect only if the iframe has the same origin.
|
||||||
///If [webViewController] is `null` or JavaScript is disabled for it, it will try to use a [HeadlessInAppWebView]
|
///If [webViewController] is `null` or JavaScript is disabled for it, it will try to use a [PlatformHeadlessInAppWebView]
|
||||||
///to delete the cookie (session-only cookie and cookie with `isHttpOnly` enabled won't be deleted!).
|
///to delete the cookie (session-only cookie and cookie with `isHttpOnly` enabled won't be deleted!).
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS ([Official API - WKHTTPCookieStore.delete](https://developer.apple.com/documentation/webkit/wkhttpcookiestore/2882009-delete)
|
///- iOS ([Official API - WKHTTPCookieStore.delete](https://developer.apple.com/documentation/webkit/wkhttpcookiestore/2882009-delete)
|
||||||
///- MacOS ([Official API - WKHTTPCookieStore.delete](https://developer.apple.com/documentation/webkit/wkhttpcookiestore/2882009-delete)
|
///- MacOS ([Official API - WKHTTPCookieStore.delete](https://developer.apple.com/documentation/webkit/wkhttpcookiestore/2882009-delete)
|
||||||
///- Web
|
///- Web
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> deleteCookie(
|
Future<void> deleteCookie(
|
||||||
{required WebUri url,
|
{required WebUri url,
|
||||||
required String name,
|
required String name,
|
||||||
@ -190,6 +201,7 @@ abstract class PlatformCookieManager extends PlatformInterface {
|
|||||||
'deleteCookie is not implemented on the current platform');
|
'deleteCookie is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformCookieManager.deleteCookies}
|
||||||
///Removes all cookies for the given [url], [domain] and [path].
|
///Removes all cookies for the given [url], [domain] and [path].
|
||||||
///
|
///
|
||||||
///The default value of [path] is `"/"`.
|
///The default value of [path] is `"/"`.
|
||||||
@ -198,18 +210,19 @@ abstract class PlatformCookieManager extends PlatformInterface {
|
|||||||
///from the current context of the `WebView` managed by that controller when you need to target iOS below 11, MacOS below 10.13 and Web platform. JavaScript must be enabled in order to work.
|
///from the current context of the `WebView` managed by that controller when you need to target iOS below 11, MacOS below 10.13 and Web platform. JavaScript must be enabled in order to work.
|
||||||
///In this case the [url] parameter is ignored.
|
///In this case the [url] parameter is ignored.
|
||||||
///
|
///
|
||||||
///**NOTE for iOS below 11.0 and MacOS below 10.13**: If [webViewController] is `null` or JavaScript is disabled for it, it will try to use a [HeadlessInAppWebView]
|
///**NOTE for iOS below 11.0 and MacOS below 10.13**: If [webViewController] is `null` or JavaScript is disabled for it, it will try to use a [PlatformHeadlessInAppWebView]
|
||||||
///to delete the cookies (session-only cookies and cookies with `isHttpOnly` enabled won't be deleted!).
|
///to delete the cookies (session-only cookies and cookies with `isHttpOnly` enabled won't be deleted!).
|
||||||
///
|
///
|
||||||
///**NOTE for Web**: this method will have effect only if the iframe has the same origin.
|
///**NOTE for Web**: this method will have effect only if the iframe has the same origin.
|
||||||
///If [webViewController] is `null` or JavaScript is disabled for it, it will try to use a [HeadlessInAppWebView]
|
///If [webViewController] is `null` or JavaScript is disabled for it, it will try to use a [PlatformHeadlessInAppWebView]
|
||||||
///to delete the cookies (session-only cookies and cookies with `isHttpOnly` enabled won't be deleted!).
|
///to delete the cookies (session-only cookies and cookies with `isHttpOnly` enabled won't be deleted!).
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
///- Web
|
///- Web
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> deleteCookies(
|
Future<void> deleteCookies(
|
||||||
{required WebUri url,
|
{required WebUri url,
|
||||||
String path = "/",
|
String path = "/",
|
||||||
@ -221,30 +234,34 @@ abstract class PlatformCookieManager extends PlatformInterface {
|
|||||||
'deleteCookies is not implemented on the current platform');
|
'deleteCookies is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformCookieManager.deleteAllCookies}
|
||||||
///Removes all cookies.
|
///Removes all cookies.
|
||||||
///
|
///
|
||||||
///**NOTE for iOS**: available from iOS 11.0+.
|
///**NOTE for iOS**: available from iOS 11.0+.
|
||||||
///
|
///
|
||||||
///**NOTE for MacOS**: available from iOS 10.13+.
|
///**NOTE for MacOS**: available from iOS 10.13+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - CookieManager.removeAllCookies](https://developer.android.com/reference/android/webkit/CookieManager#removeAllCookies(android.webkit.ValueCallback%3Cjava.lang.Boolean%3E)))
|
///- Android native WebView ([Official API - CookieManager.removeAllCookies](https://developer.android.com/reference/android/webkit/CookieManager#removeAllCookies(android.webkit.ValueCallback%3Cjava.lang.Boolean%3E)))
|
||||||
///- iOS ([Official API - WKWebsiteDataStore.removeData](https://developer.apple.com/documentation/webkit/wkwebsitedatastore/1532938-removedata))
|
///- iOS ([Official API - WKWebsiteDataStore.removeData](https://developer.apple.com/documentation/webkit/wkwebsitedatastore/1532938-removedata))
|
||||||
///- MacOS ([Official API - WKWebsiteDataStore.removeData](https://developer.apple.com/documentation/webkit/wkwebsitedatastore/1532938-removedata))
|
///- MacOS ([Official API - WKWebsiteDataStore.removeData](https://developer.apple.com/documentation/webkit/wkwebsitedatastore/1532938-removedata))
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> deleteAllCookies() {
|
Future<void> deleteAllCookies() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'deleteAllCookies is not implemented on the current platform');
|
'deleteAllCookies is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformCookieManager.getAllCookies}
|
||||||
///Fetches all stored cookies.
|
///Fetches all stored cookies.
|
||||||
///
|
///
|
||||||
///**NOTE for iOS**: available on iOS 11.0+.
|
///**NOTE for iOS**: available on iOS 11.0+.
|
||||||
///
|
///
|
||||||
///**NOTE for MacOS**: available from iOS 10.13+.
|
///**NOTE for MacOS**: available from iOS 10.13+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - WKHTTPCookieStore.getAllCookies](https://developer.apple.com/documentation/webkit/wkhttpcookiestore/2882005-getallcookies))
|
///- iOS ([Official API - WKHTTPCookieStore.getAllCookies](https://developer.apple.com/documentation/webkit/wkhttpcookiestore/2882005-getallcookies))
|
||||||
///- MacOS ([Official API - WKHTTPCookieStore.getAllCookies](https://developer.apple.com/documentation/webkit/wkhttpcookiestore/2882005-getallcookies))
|
///- MacOS ([Official API - WKHTTPCookieStore.getAllCookies](https://developer.apple.com/documentation/webkit/wkhttpcookiestore/2882005-getallcookies))
|
||||||
|
///{@endtemplate}
|
||||||
Future<List<Cookie>> getAllCookies() {
|
Future<List<Cookie>> getAllCookies() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'getAllCookies is not implemented on the current platform');
|
'getAllCookies is not implemented on the current platform');
|
||||||
|
@ -15,16 +15,18 @@ class PlatformHttpAuthCredentialDatabaseCreationParams {
|
|||||||
const PlatformHttpAuthCredentialDatabaseCreationParams();
|
const PlatformHttpAuthCredentialDatabaseCreationParams();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformHttpAuthCredentialDatabase}
|
||||||
///Class that implements a singleton object (shared instance) which manages the shared HTTP auth credentials cache.
|
///Class that implements a singleton object (shared instance) which manages the shared HTTP auth credentials cache.
|
||||||
///On iOS and MacOS, this class uses the [URLCredentialStorage](https://developer.apple.com/documentation/foundation/urlcredentialstorage) class.
|
///On iOS and MacOS, this class uses the [URLCredentialStorage](https://developer.apple.com/documentation/foundation/urlcredentialstorage) class.
|
||||||
///On Android, this class has a custom implementation using `android.database.sqlite.SQLiteDatabase` because
|
///On Android, this class has a custom implementation using `android.database.sqlite.SQLiteDatabase` because
|
||||||
///[WebViewDatabase](https://developer.android.com/reference/android/webkit/WebViewDatabase)
|
///[WebViewDatabase](https://developer.android.com/reference/android/webkit/WebViewDatabase)
|
||||||
///doesn't offer the same functionalities as iOS `URLCredentialStorage`.
|
///doesn't offer the same functionalities as iOS `URLCredentialStorage`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
|
///{@endtemplate}
|
||||||
abstract class PlatformHttpAuthCredentialDatabase extends PlatformInterface {
|
abstract class PlatformHttpAuthCredentialDatabase extends PlatformInterface {
|
||||||
/// Creates a new [PlatformHttpAuthCredentialDatabase]
|
/// Creates a new [PlatformHttpAuthCredentialDatabase]
|
||||||
factory PlatformHttpAuthCredentialDatabase(
|
factory PlatformHttpAuthCredentialDatabase(
|
||||||
@ -57,37 +59,43 @@ abstract class PlatformHttpAuthCredentialDatabase extends PlatformInterface {
|
|||||||
/// The parameters used to initialize the [PlatformHttpAuthCredentialDatabase].
|
/// The parameters used to initialize the [PlatformHttpAuthCredentialDatabase].
|
||||||
final PlatformHttpAuthCredentialDatabaseCreationParams params;
|
final PlatformHttpAuthCredentialDatabaseCreationParams params;
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformHttpAuthCredentialDatabase.getAllAuthCredentials}
|
||||||
///Gets a map list of all HTTP auth credentials saved.
|
///Gets a map list of all HTTP auth credentials saved.
|
||||||
///Each map contains the key `protectionSpace` of type [URLProtectionSpace]
|
///Each map contains the key `protectionSpace` of type [URLProtectionSpace]
|
||||||
///and the key `credentials` of type List<[URLCredential]> that contains all the HTTP auth credentials saved for that `protectionSpace`.
|
///and the key `credentials` of type List<[URLCredential]> that contains all the HTTP auth credentials saved for that `protectionSpace`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS ([Official API - URLCredentialStorage.allCredentials](https://developer.apple.com/documentation/foundation/urlcredentialstorage/1413859-allcredentials))
|
///- iOS ([Official API - URLCredentialStorage.allCredentials](https://developer.apple.com/documentation/foundation/urlcredentialstorage/1413859-allcredentials))
|
||||||
///- MacOS ([Official API - URLCredentialStorage.allCredentials](https://developer.apple.com/documentation/foundation/urlcredentialstorage/1413859-allcredentials))
|
///- MacOS ([Official API - URLCredentialStorage.allCredentials](https://developer.apple.com/documentation/foundation/urlcredentialstorage/1413859-allcredentials))
|
||||||
|
///{@endtemplate}
|
||||||
Future<List<URLProtectionSpaceHttpAuthCredentials>> getAllAuthCredentials() {
|
Future<List<URLProtectionSpaceHttpAuthCredentials>> getAllAuthCredentials() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'getAllAuthCredentials is not implemented on the current platform');
|
'getAllAuthCredentials is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformHttpAuthCredentialDatabase.getHttpAuthCredentials}
|
||||||
///Gets all the HTTP auth credentials saved for that [protectionSpace].
|
///Gets all the HTTP auth credentials saved for that [protectionSpace].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
|
///{@endtemplate}
|
||||||
Future<List<URLCredential>> getHttpAuthCredentials(
|
Future<List<URLCredential>> getHttpAuthCredentials(
|
||||||
{required URLProtectionSpace protectionSpace}) {
|
{required URLProtectionSpace protectionSpace}) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'getHttpAuthCredentials is not implemented on the current platform');
|
'getHttpAuthCredentials is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformHttpAuthCredentialDatabase.setHttpAuthCredential}
|
||||||
///Saves an HTTP auth [credential] for that [protectionSpace].
|
///Saves an HTTP auth [credential] for that [protectionSpace].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS ([Official API - URLCredentialStorage.set](https://developer.apple.com/documentation/foundation/urlcredentialstorage/1407227-set))
|
///- iOS ([Official API - URLCredentialStorage.set](https://developer.apple.com/documentation/foundation/urlcredentialstorage/1407227-set))
|
||||||
///- MacOS ([Official API - URLCredentialStorage.set](https://developer.apple.com/documentation/foundation/urlcredentialstorage/1407227-set))
|
///- MacOS ([Official API - URLCredentialStorage.set](https://developer.apple.com/documentation/foundation/urlcredentialstorage/1407227-set))
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> setHttpAuthCredential(
|
Future<void> setHttpAuthCredential(
|
||||||
{required URLProtectionSpace protectionSpace,
|
{required URLProtectionSpace protectionSpace,
|
||||||
required URLCredential credential}) {
|
required URLCredential credential}) {
|
||||||
@ -95,12 +103,14 @@ abstract class PlatformHttpAuthCredentialDatabase extends PlatformInterface {
|
|||||||
'setHttpAuthCredential is not implemented on the current platform');
|
'setHttpAuthCredential is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformHttpAuthCredentialDatabase.removeHttpAuthCredential}
|
||||||
///Removes an HTTP auth [credential] for that [protectionSpace].
|
///Removes an HTTP auth [credential] for that [protectionSpace].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS ([Official API - URLCredentialStorage.remove](https://developer.apple.com/documentation/foundation/urlcredentialstorage/1408664-remove))
|
///- iOS ([Official API - URLCredentialStorage.remove](https://developer.apple.com/documentation/foundation/urlcredentialstorage/1408664-remove))
|
||||||
///- MacOS ([Official API - URLCredentialStorage.remove](https://developer.apple.com/documentation/foundation/urlcredentialstorage/1408664-remove))
|
///- MacOS ([Official API - URLCredentialStorage.remove](https://developer.apple.com/documentation/foundation/urlcredentialstorage/1408664-remove))
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> removeHttpAuthCredential(
|
Future<void> removeHttpAuthCredential(
|
||||||
{required URLProtectionSpace protectionSpace,
|
{required URLProtectionSpace protectionSpace,
|
||||||
required URLCredential credential}) {
|
required URLCredential credential}) {
|
||||||
@ -108,24 +118,28 @@ abstract class PlatformHttpAuthCredentialDatabase extends PlatformInterface {
|
|||||||
'removeHttpAuthCredential is not implemented on the current platform');
|
'removeHttpAuthCredential is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformHttpAuthCredentialDatabase.removeHttpAuthCredentials}
|
||||||
///Removes all the HTTP auth credentials saved for that [protectionSpace].
|
///Removes all the HTTP auth credentials saved for that [protectionSpace].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> removeHttpAuthCredentials(
|
Future<void> removeHttpAuthCredentials(
|
||||||
{required URLProtectionSpace protectionSpace}) {
|
{required URLProtectionSpace protectionSpace}) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'removeHttpAuthCredentials is not implemented on the current platform');
|
'removeHttpAuthCredentials is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformHttpAuthCredentialDatabase.clearAllAuthCredentials}
|
||||||
///Removes all the HTTP auth credentials saved in the database.
|
///Removes all the HTTP auth credentials saved in the database.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> clearAllAuthCredentials() {
|
Future<void> clearAllAuthCredentials() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'clearAllAuthCredentials is not implemented on the current platform');
|
'clearAllAuthCredentials is not implemented on the current platform');
|
||||||
|
@ -31,14 +31,16 @@ class PlatformInAppLocalhostServerCreationParams {
|
|||||||
final bool shared;
|
final bool shared;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformInAppLocalhostServer}
|
||||||
///This class allows you to create a simple server on `http://localhost:[port]/`
|
///This class allows you to create a simple server on `http://localhost:[port]/`
|
||||||
///in order to be able to load your assets file on a local server.
|
///in order to be able to load your assets file on a local server.
|
||||||
///The default `port` value is `8080`.
|
///The default `port` value is `8080`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
|
///{@endtemplate}
|
||||||
abstract class PlatformInAppLocalhostServer extends PlatformInterface {
|
abstract class PlatformInAppLocalhostServer extends PlatformInterface {
|
||||||
/// Creates a new [PlatformInAppLocalhostServer]
|
/// Creates a new [PlatformInAppLocalhostServer]
|
||||||
factory PlatformInAppLocalhostServer(
|
factory PlatformInAppLocalhostServer(
|
||||||
@ -96,6 +98,7 @@ abstract class PlatformInAppLocalhostServer extends PlatformInterface {
|
|||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
bool get shared => params.shared;
|
bool get shared => params.shared;
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformInAppLocalhostServer.start}
|
||||||
///Starts the server on `http://localhost:[port]/`.
|
///Starts the server on `http://localhost:[port]/`.
|
||||||
///
|
///
|
||||||
///**NOTE for iOS**: For the iOS Platform, you need to add the `NSAllowsLocalNetworking` key with `true` in the `Info.plist` file
|
///**NOTE for iOS**: For the iOS Platform, you need to add the `NSAllowsLocalNetworking` key with `true` in the `Info.plist` file
|
||||||
@ -108,18 +111,23 @@ abstract class PlatformInAppLocalhostServer extends PlatformInterface {
|
|||||||
///</dict>
|
///</dict>
|
||||||
///```
|
///```
|
||||||
///The `NSAllowsLocalNetworking` key is available since **iOS 10**.
|
///The `NSAllowsLocalNetworking` key is available since **iOS 10**.
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> start() {
|
Future<void> start() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'start is not implemented on the current platform');
|
'start is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformInAppLocalhostServer.close}
|
||||||
///Closes the server.
|
///Closes the server.
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> close() {
|
Future<void> close() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'close is not implemented on the current platform');
|
'close is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformInAppLocalhostServer.isRunning}
|
||||||
///Indicates if the server is running or not.
|
///Indicates if the server is running or not.
|
||||||
|
///{@endtemplate}
|
||||||
bool isRunning() {
|
bool isRunning() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'isRunning is not implemented on the current platform');
|
'isRunning is not implemented on the current platform');
|
||||||
|
@ -18,6 +18,7 @@ class PlatformProcessGlobalConfigCreationParams {
|
|||||||
const PlatformProcessGlobalConfigCreationParams();
|
const PlatformProcessGlobalConfigCreationParams();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformProcessGlobalConfig}
|
||||||
///Process Global Configuration for `WebView`.
|
///Process Global Configuration for `WebView`.
|
||||||
///WebView has some process-global configuration parameters
|
///WebView has some process-global configuration parameters
|
||||||
///that cannot be changed once WebView has been loaded.
|
///that cannot be changed once WebView has been loaded.
|
||||||
@ -38,8 +39,9 @@ class PlatformProcessGlobalConfigCreationParams {
|
|||||||
///The configuration should be set up as early as possible during application startup,
|
///The configuration should be set up as early as possible during application startup,
|
||||||
///to ensure that it happens before any other thread can call a method that loads `WebView`.
|
///to ensure that it happens before any other thread can call a method that loads `WebView`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - ProcessGlobalConfig](https://developer.android.com/reference/androidx/webkit/ProcessGlobalConfig))
|
///- Android native WebView ([Official API - ProcessGlobalConfig](https://developer.android.com/reference/androidx/webkit/ProcessGlobalConfig))
|
||||||
|
///{@endtemplate}
|
||||||
abstract class PlatformProcessGlobalConfig extends PlatformInterface {
|
abstract class PlatformProcessGlobalConfig extends PlatformInterface {
|
||||||
/// Creates a new [PlatformProcessGlobalConfig]
|
/// Creates a new [PlatformProcessGlobalConfig]
|
||||||
factory PlatformProcessGlobalConfig(
|
factory PlatformProcessGlobalConfig(
|
||||||
@ -72,13 +74,15 @@ abstract class PlatformProcessGlobalConfig extends PlatformInterface {
|
|||||||
/// The parameters used to initialize the [PlatformProcessGlobalConfig].
|
/// The parameters used to initialize the [PlatformProcessGlobalConfig].
|
||||||
final PlatformProcessGlobalConfigCreationParams params;
|
final PlatformProcessGlobalConfigCreationParams params;
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformProcessGlobalConfig.apply}
|
||||||
///Applies the configuration to be used by `WebView` on loading.
|
///Applies the configuration to be used by `WebView` on loading.
|
||||||
///This method can only be called once.
|
///This method can only be called once.
|
||||||
///
|
///
|
||||||
///Calling this method will not cause `WebView` to be loaded and will not block the calling thread.
|
///Calling this method will not cause `WebView` to be loaded and will not block the calling thread.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - ProcessGlobalConfig.apply](https://developer.android.com/reference/androidx/webkit/ProcessGlobalConfig#apply(androidx.webkit.ProcessGlobalConfig)))
|
///- Android native WebView ([Official API - ProcessGlobalConfig.apply](https://developer.android.com/reference/androidx/webkit/ProcessGlobalConfig#apply(androidx.webkit.ProcessGlobalConfig)))
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> apply({required ProcessGlobalConfigSettings settings}) {
|
Future<void> apply({required ProcessGlobalConfigSettings settings}) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'apply is not implemented on the current platform');
|
'apply is not implemented on the current platform');
|
||||||
@ -87,7 +91,7 @@ abstract class PlatformProcessGlobalConfig extends PlatformInterface {
|
|||||||
|
|
||||||
///Class that represents the settings used to configure the [PlatformProcessGlobalConfig].
|
///Class that represents the settings used to configure the [PlatformProcessGlobalConfig].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
@ExchangeableObject(copyMethod: true)
|
@ExchangeableObject(copyMethod: true)
|
||||||
class ProcessGlobalConfigSettings_ {
|
class ProcessGlobalConfigSettings_ {
|
||||||
@ -141,7 +145,7 @@ class ProcessGlobalConfigSettings_ {
|
|||||||
|
|
||||||
///Class that represents the settings used to configure the [ProcessGlobalConfigSettings.directoryBasePaths].
|
///Class that represents the settings used to configure the [ProcessGlobalConfigSettings.directoryBasePaths].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - ProxyConfig](https://developer.android.com/reference/androidx/webkit/ProxyConfig))
|
///- Android native WebView ([Official API - ProxyConfig](https://developer.android.com/reference/androidx/webkit/ProxyConfig))
|
||||||
@ExchangeableObject()
|
@ExchangeableObject()
|
||||||
class ProcessGlobalConfigDirectoryBasePaths_ {
|
class ProcessGlobalConfigDirectoryBasePaths_ {
|
||||||
|
@ -8,7 +8,7 @@ part of 'platform_process_global_config.dart';
|
|||||||
|
|
||||||
///Class that represents the settings used to configure the [PlatformProcessGlobalConfig].
|
///Class that represents the settings used to configure the [PlatformProcessGlobalConfig].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
class ProcessGlobalConfigSettings {
|
class ProcessGlobalConfigSettings {
|
||||||
///The directory name suffix to be used for the current process.
|
///The directory name suffix to be used for the current process.
|
||||||
@ -97,7 +97,7 @@ class ProcessGlobalConfigSettings {
|
|||||||
|
|
||||||
///Class that represents the settings used to configure the [ProcessGlobalConfigSettings.directoryBasePaths].
|
///Class that represents the settings used to configure the [ProcessGlobalConfigSettings.directoryBasePaths].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - ProxyConfig](https://developer.android.com/reference/androidx/webkit/ProxyConfig))
|
///- Android native WebView ([Official API - ProxyConfig](https://developer.android.com/reference/androidx/webkit/ProxyConfig))
|
||||||
class ProcessGlobalConfigDirectoryBasePaths {
|
class ProcessGlobalConfigDirectoryBasePaths {
|
||||||
///The absolute base path for the WebView cache directory.
|
///The absolute base path for the WebView cache directory.
|
||||||
|
@ -18,6 +18,7 @@ class PlatformProxyControllerCreationParams {
|
|||||||
const PlatformProxyControllerCreationParams();
|
const PlatformProxyControllerCreationParams();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformProxyController}
|
||||||
///Manages setting and clearing a process-specific override for the Android system-wide proxy settings that govern network requests made by `WebView`.
|
///Manages setting and clearing a process-specific override for the Android system-wide proxy settings that govern network requests made by `WebView`.
|
||||||
///
|
///
|
||||||
///`WebView` may make network requests in order to fetch content that is not otherwise read from the file system or provided directly by application code.
|
///`WebView` may make network requests in order to fetch content that is not otherwise read from the file system or provided directly by application code.
|
||||||
@ -26,8 +27,9 @@ class PlatformProxyControllerCreationParams {
|
|||||||
///In the rare case that it is necessary for an application to explicitly specify its proxy configuration,
|
///In the rare case that it is necessary for an application to explicitly specify its proxy configuration,
|
||||||
///this API may be used to explicitly specify the proxy rules that govern WebView initiated network requests.
|
///this API may be used to explicitly specify the proxy rules that govern WebView initiated network requests.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - ProxyController](https://developer.android.com/reference/androidx/webkit/ProxyController))
|
///- Android native WebView ([Official API - ProxyController](https://developer.android.com/reference/androidx/webkit/ProxyController))
|
||||||
|
///{@endtemplate}
|
||||||
abstract class PlatformProxyController extends PlatformInterface {
|
abstract class PlatformProxyController extends PlatformInterface {
|
||||||
/// Creates a new [PlatformProxyController]
|
/// Creates a new [PlatformProxyController]
|
||||||
factory PlatformProxyController(
|
factory PlatformProxyController(
|
||||||
@ -58,23 +60,27 @@ abstract class PlatformProxyController extends PlatformInterface {
|
|||||||
/// The parameters used to initialize the [PlatformProxyController].
|
/// The parameters used to initialize the [PlatformProxyController].
|
||||||
final PlatformProxyControllerCreationParams params;
|
final PlatformProxyControllerCreationParams params;
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformProxyController.setProxyOverride}
|
||||||
///Sets [ProxySettings] which will be used by all `WebView`s in the app.
|
///Sets [ProxySettings] which will be used by all `WebView`s in the app.
|
||||||
///URLs that match patterns in the bypass list will not be directed to any proxy.
|
///URLs that match patterns in the bypass list will not be directed to any proxy.
|
||||||
///Instead, the request will be made directly to the origin specified by the URL.
|
///Instead, the request will be made directly to the origin specified by the URL.
|
||||||
///Network connections are not guaranteed to immediately use the new proxy setting; wait for the method to return before loading a page.
|
///Network connections are not guaranteed to immediately use the new proxy setting; wait for the method to return before loading a page.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - ProxyController.setProxyOverride](https://developer.android.com/reference/androidx/webkit/ProxyController#setProxyOverride(androidx.webkit.ProxyConfig,%20java.util.concurrent.Executor,%20java.lang.Runnable)))
|
///- Android native WebView ([Official API - ProxyController.setProxyOverride](https://developer.android.com/reference/androidx/webkit/ProxyController#setProxyOverride(androidx.webkit.ProxyConfig,%20java.util.concurrent.Executor,%20java.lang.Runnable)))
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> setProxyOverride({required ProxySettings settings}) {
|
Future<void> setProxyOverride({required ProxySettings settings}) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'setProxyOverride is not implemented on the current platform');
|
'setProxyOverride is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformProxyController.clearProxyOverride}
|
||||||
///Clears the proxy settings.
|
///Clears the proxy settings.
|
||||||
///Network connections are not guaranteed to immediately use the new proxy setting; wait for the method to return before loading a page.
|
///Network connections are not guaranteed to immediately use the new proxy setting; wait for the method to return before loading a page.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - ProxyController.clearProxyOverride](https://developer.android.com/reference/androidx/webkit/ProxyController#clearProxyOverride(java.util.concurrent.Executor,%20java.lang.Runnable)))
|
///- Android native WebView ([Official API - ProxyController.clearProxyOverride](https://developer.android.com/reference/androidx/webkit/ProxyController#clearProxyOverride(java.util.concurrent.Executor,%20java.lang.Runnable)))
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> clearProxyOverride() {
|
Future<void> clearProxyOverride() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'clearProxyOverride is not implemented on the current platform');
|
'clearProxyOverride is not implemented on the current platform');
|
||||||
@ -83,7 +89,7 @@ abstract class PlatformProxyController extends PlatformInterface {
|
|||||||
|
|
||||||
///Class that represents the settings used to configure the [PlatformProxyController].
|
///Class that represents the settings used to configure the [PlatformProxyController].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - ProxyConfig](https://developer.android.com/reference/androidx/webkit/ProxyConfig))
|
///- Android native WebView ([Official API - ProxyConfig](https://developer.android.com/reference/androidx/webkit/ProxyConfig))
|
||||||
@ExchangeableObject(copyMethod: true)
|
@ExchangeableObject(copyMethod: true)
|
||||||
class ProxySettings_ {
|
class ProxySettings_ {
|
||||||
|
@ -8,7 +8,7 @@ part of 'platform_proxy_controller.dart';
|
|||||||
|
|
||||||
///Class that represents the settings used to configure the [PlatformProxyController].
|
///Class that represents the settings used to configure the [PlatformProxyController].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - ProxyConfig](https://developer.android.com/reference/androidx/webkit/ProxyConfig))
|
///- Android native WebView ([Official API - ProxyConfig](https://developer.android.com/reference/androidx/webkit/ProxyConfig))
|
||||||
class ProxySettings {
|
class ProxySettings {
|
||||||
///List of bypass rules.
|
///List of bypass rules.
|
||||||
|
@ -14,12 +14,14 @@ class PlatformServiceWorkerControllerCreationParams {
|
|||||||
const PlatformServiceWorkerControllerCreationParams();
|
const PlatformServiceWorkerControllerCreationParams();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformServiceWorkerController}
|
||||||
///Class that manages Service Workers used by `WebView`.
|
///Class that manages Service Workers used by `WebView`.
|
||||||
///
|
///
|
||||||
///**NOTE**: available on Android 24+.
|
///**NOTE**: available on Android 24+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - ServiceWorkerControllerCompat](https://developer.android.com/reference/androidx/webkit/ServiceWorkerControllerCompat))
|
///- Android native WebView ([Official API - ServiceWorkerControllerCompat](https://developer.android.com/reference/androidx/webkit/ServiceWorkerControllerCompat))
|
||||||
|
///{@endtemplate}
|
||||||
abstract class PlatformServiceWorkerController extends PlatformInterface {
|
abstract class PlatformServiceWorkerController extends PlatformInterface {
|
||||||
/// Creates a new [PlatformServiceWorkerController]
|
/// Creates a new [PlatformServiceWorkerController]
|
||||||
factory PlatformServiceWorkerController(
|
factory PlatformServiceWorkerController(
|
||||||
@ -68,114 +70,138 @@ abstract class PlatformServiceWorkerController extends PlatformInterface {
|
|||||||
/// The parameters used to initialize the [PlatformServiceWorkerController].
|
/// The parameters used to initialize the [PlatformServiceWorkerController].
|
||||||
final PlatformServiceWorkerControllerCreationParams params;
|
final PlatformServiceWorkerControllerCreationParams params;
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformServiceWorkerController.serviceWorkerClient}
|
||||||
|
///Service Worker client.
|
||||||
|
///{@endtemplate}
|
||||||
ServiceWorkerClient? get serviceWorkerClient;
|
ServiceWorkerClient? get serviceWorkerClient;
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformServiceWorkerController.setServiceWorkerClient}
|
||||||
///Sets the client to capture service worker related callbacks.
|
///Sets the client to capture service worker related callbacks.
|
||||||
///A [ServiceWorkerClient] should be set before any service workers are active, e.g. a safe place is before any WebView instances are created or pages loaded.
|
///A [ServiceWorkerClient] should be set before any service workers are active, e.g. a safe place is before any WebView instances are created or pages loaded.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - ServiceWorkerControllerCompat.setServiceWorkerClient](https://developer.android.com/reference/androidx/webkit/ServiceWorkerControllerCompat#setServiceWorkerClient(androidx.webkit.ServiceWorkerClientCompat)))
|
///- Android native WebView ([Official API - ServiceWorkerControllerCompat.setServiceWorkerClient](https://developer.android.com/reference/androidx/webkit/ServiceWorkerControllerCompat#setServiceWorkerClient(androidx.webkit.ServiceWorkerClientCompat)))
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> setServiceWorkerClient(ServiceWorkerClient? value) {
|
Future<void> setServiceWorkerClient(ServiceWorkerClient? value) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'setServiceWorkerClient is not implemented on the current platform');
|
'setServiceWorkerClient is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformServiceWorkerController.getAllowContentAccess}
|
||||||
///Gets whether Service Workers support content URL access.
|
///Gets whether Service Workers support content URL access.
|
||||||
///This method should only be called if [WebViewFeature.isFeatureSupported] returns `true` for [WebViewFeature.SERVICE_WORKER_CONTENT_ACCESS].
|
///This method should only be called if [WebViewFeature.isFeatureSupported] returns `true` for [WebViewFeature.SERVICE_WORKER_CONTENT_ACCESS].
|
||||||
///
|
///
|
||||||
///**NOTE**: available on Android 24+.
|
///**NOTE**: available on Android 24+.
|
||||||
///
|
///
|
||||||
///**Official Android API**: https://developer.android.com/reference/androidx/webkit/ServiceWorkerWebSettingsCompat#getAllowContentAccess()
|
///**Official Android API**: https://developer.android.com/reference/androidx/webkit/ServiceWorkerWebSettingsCompat#getAllowContentAccess()
|
||||||
|
///{@endtemplate}
|
||||||
Future<bool> getAllowContentAccess() {
|
Future<bool> getAllowContentAccess() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'getAllowContentAccess is not implemented on the current platform');
|
'getAllowContentAccess is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformServiceWorkerController.getAllowFileAccess}
|
||||||
///Gets whether Service Workers support file access.
|
///Gets whether Service Workers support file access.
|
||||||
///This method should only be called if [WebViewFeature.isFeatureSupported] returns `true` for [WebViewFeature.SERVICE_WORKER_FILE_ACCESS].
|
///This method should only be called if [WebViewFeature.isFeatureSupported] returns `true` for [WebViewFeature.SERVICE_WORKER_FILE_ACCESS].
|
||||||
///
|
///
|
||||||
///**NOTE**: available on Android 24+.
|
///**NOTE**: available on Android 24+.
|
||||||
///
|
///
|
||||||
///**Official Android API**: https://developer.android.com/reference/androidx/webkit/ServiceWorkerWebSettingsCompat#getAllowFileAccess()
|
///**Official Android API**: https://developer.android.com/reference/androidx/webkit/ServiceWorkerWebSettingsCompat#getAllowFileAccess()
|
||||||
|
///{@endtemplate}
|
||||||
Future<bool> getAllowFileAccess() {
|
Future<bool> getAllowFileAccess() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'getAllowFileAccess is not implemented on the current platform');
|
'getAllowFileAccess is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformServiceWorkerController.getBlockNetworkLoads}
|
||||||
///Gets whether Service Workers are prohibited from loading any resources from the network.
|
///Gets whether Service Workers are prohibited from loading any resources from the network.
|
||||||
///This method should only be called if [WebViewFeature.isFeatureSupported] returns `true` for [WebViewFeature.SERVICE_WORKER_BLOCK_NETWORK_LOADS].
|
///This method should only be called if [WebViewFeature.isFeatureSupported] returns `true` for [WebViewFeature.SERVICE_WORKER_BLOCK_NETWORK_LOADS].
|
||||||
///
|
///
|
||||||
///**NOTE**: available on Android 24+.
|
///**NOTE**: available on Android 24+.
|
||||||
///
|
///
|
||||||
///**Official Android API**: https://developer.android.com/reference/androidx/webkit/ServiceWorkerWebSettingsCompat#getBlockNetworkLoads()
|
///**Official Android API**: https://developer.android.com/reference/androidx/webkit/ServiceWorkerWebSettingsCompat#getBlockNetworkLoads()
|
||||||
|
///{@endtemplate}
|
||||||
Future<bool> getBlockNetworkLoads() {
|
Future<bool> getBlockNetworkLoads() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'getBlockNetworkLoads is not implemented on the current platform');
|
'getBlockNetworkLoads is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformServiceWorkerController.getCacheMode}
|
||||||
///Gets the current setting for overriding the cache mode.
|
///Gets the current setting for overriding the cache mode.
|
||||||
///This method should only be called if [WebViewFeature.isFeatureSupported] returns `true` for [WebViewFeature.SERVICE_WORKER_CACHE_MODE].
|
///This method should only be called if [WebViewFeature.isFeatureSupported] returns `true` for [WebViewFeature.SERVICE_WORKER_CACHE_MODE].
|
||||||
///
|
///
|
||||||
///**NOTE**: available on Android 24+.
|
///**NOTE**: available on Android 24+.
|
||||||
///
|
///
|
||||||
///**Official Android API**: https://developer.android.com/reference/androidx/webkit/ServiceWorkerWebSettingsCompat#getCacheMode()
|
///**Official Android API**: https://developer.android.com/reference/androidx/webkit/ServiceWorkerWebSettingsCompat#getCacheMode()
|
||||||
|
///{@endtemplate}
|
||||||
Future<CacheMode?> getCacheMode() {
|
Future<CacheMode?> getCacheMode() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'getCacheMode is not implemented on the current platform');
|
'getCacheMode is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformServiceWorkerController.setAllowContentAccess}
|
||||||
///Enables or disables content URL access from Service Workers.
|
///Enables or disables content URL access from Service Workers.
|
||||||
///This method should only be called if [WebViewFeature.isFeatureSupported] returns `true` for [WebViewFeature.SERVICE_WORKER_CONTENT_ACCESS].
|
///This method should only be called if [WebViewFeature.isFeatureSupported] returns `true` for [WebViewFeature.SERVICE_WORKER_CONTENT_ACCESS].
|
||||||
///
|
///
|
||||||
///**NOTE**: available on Android 24+.
|
///**NOTE**: available on Android 24+.
|
||||||
///
|
///
|
||||||
///**Official Android API**: https://developer.android.com/reference/androidx/webkit/ServiceWorkerWebSettingsCompat#setAllowContentAccess(boolean)
|
///**Official Android API**: https://developer.android.com/reference/androidx/webkit/ServiceWorkerWebSettingsCompat#setAllowContentAccess(boolean)
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> setAllowContentAccess(bool allow) {
|
Future<void> setAllowContentAccess(bool allow) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'setAllowContentAccess is not implemented on the current platform');
|
'setAllowContentAccess is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformServiceWorkerController.setAllowFileAccess}
|
||||||
///Enables or disables file access within Service Workers.
|
///Enables or disables file access within Service Workers.
|
||||||
///This method should only be called if [WebViewFeature.isFeatureSupported] returns `true` for [WebViewFeature.SERVICE_WORKER_FILE_ACCESS].
|
///This method should only be called if [WebViewFeature.isFeatureSupported] returns `true` for [WebViewFeature.SERVICE_WORKER_FILE_ACCESS].
|
||||||
///
|
///
|
||||||
///**NOTE**: available on Android 24+.
|
///**NOTE**: available on Android 24+.
|
||||||
///
|
///
|
||||||
///**Official Android API**: https://developer.android.com/reference/androidx/webkit/ServiceWorkerWebSettingsCompat#setAllowFileAccess(boolean)
|
///**Official Android API**: https://developer.android.com/reference/androidx/webkit/ServiceWorkerWebSettingsCompat#setAllowFileAccess(boolean)
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> setAllowFileAccess(bool allow) {
|
Future<void> setAllowFileAccess(bool allow) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'setAllowFileAccess is not implemented on the current platform');
|
'setAllowFileAccess is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformServiceWorkerController.setBlockNetworkLoads}
|
||||||
///Sets whether Service Workers should not load resources from the network.
|
///Sets whether Service Workers should not load resources from the network.
|
||||||
///This method should only be called if [WebViewFeature.isFeatureSupported] returns `true` for [WebViewFeature.SERVICE_WORKER_BLOCK_NETWORK_LOADS].
|
///This method should only be called if [WebViewFeature.isFeatureSupported] returns `true` for [WebViewFeature.SERVICE_WORKER_BLOCK_NETWORK_LOADS].
|
||||||
///
|
///
|
||||||
///**NOTE**: available on Android 24+.
|
///**NOTE**: available on Android 24+.
|
||||||
///
|
///
|
||||||
///**Official Android API**: https://developer.android.com/reference/androidx/webkit/ServiceWorkerWebSettingsCompat#setBlockNetworkLoads(boolean)
|
///**Official Android API**: https://developer.android.com/reference/androidx/webkit/ServiceWorkerWebSettingsCompat#setBlockNetworkLoads(boolean)
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> setBlockNetworkLoads(bool flag) {
|
Future<void> setBlockNetworkLoads(bool flag) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'setBlockNetworkLoads is not implemented on the current platform');
|
'setBlockNetworkLoads is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformServiceWorkerController.setCacheMode}
|
||||||
///Overrides the way the cache is used.
|
///Overrides the way the cache is used.
|
||||||
///This method should only be called if [WebViewFeature.isFeatureSupported] returns `true` for [WebViewFeature.SERVICE_WORKER_CACHE_MODE].
|
///This method should only be called if [WebViewFeature.isFeatureSupported] returns `true` for [WebViewFeature.SERVICE_WORKER_CACHE_MODE].
|
||||||
///
|
///
|
||||||
///**NOTE**: available on Android 24+.
|
///**NOTE**: available on Android 24+.
|
||||||
///
|
///
|
||||||
///**Official Android API**: https://developer.android.com/reference/androidx/webkit/ServiceWorkerWebSettingsCompat#setCacheMode(int)
|
///**Official Android API**: https://developer.android.com/reference/androidx/webkit/ServiceWorkerWebSettingsCompat#setCacheMode(int)
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> setCacheMode(CacheMode mode) {
|
Future<void> setCacheMode(CacheMode mode) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'setCacheMode is not implemented on the current platform');
|
'setCacheMode is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.ServiceWorkerClient}
|
||||||
///Class used by clients to capture Service Worker related callbacks.
|
///Class used by clients to capture Service Worker related callbacks.
|
||||||
///
|
///
|
||||||
///**NOTE**: available on Android 24+.
|
///**NOTE**: available on Android 24+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - ServiceWorkerClientCompat](https://developer.android.com/reference/androidx/webkit/ServiceWorkerClientCompat))
|
///- Android native WebView ([Official API - ServiceWorkerClientCompat](https://developer.android.com/reference/androidx/webkit/ServiceWorkerClientCompat))
|
||||||
|
///{@endtemplate}
|
||||||
class ServiceWorkerClient {
|
class ServiceWorkerClient {
|
||||||
|
///{@template flutter_inappwebview_platform_interface.ServiceWorkerClient.shouldInterceptRequest}
|
||||||
///Notify the host application of a resource request and allow the application to return the data.
|
///Notify the host application of a resource request and allow the application to return the data.
|
||||||
///If the return value is `null`, the Service Worker will continue to load the resource as usual.
|
///If the return value is `null`, the Service Worker will continue to load the resource as usual.
|
||||||
///Otherwise, the return response and data will be used.
|
///Otherwise, the return response and data will be used.
|
||||||
@ -186,6 +212,7 @@ class ServiceWorkerClient {
|
|||||||
///[request] represents an object containing the details of the request.
|
///[request] represents an object containing the details of the request.
|
||||||
///
|
///
|
||||||
///**NOTE**: available on Android 24+.
|
///**NOTE**: available on Android 24+.
|
||||||
|
///{@endtemplate}
|
||||||
final Future<WebResourceResponse?> Function(WebResourceRequest request)?
|
final Future<WebResourceResponse?> Function(WebResourceRequest request)?
|
||||||
shouldInterceptRequest;
|
shouldInterceptRequest;
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@ class PlatformTracingControllerCreationParams {
|
|||||||
const PlatformTracingControllerCreationParams();
|
const PlatformTracingControllerCreationParams();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformTracingController}
|
||||||
///Manages tracing of `WebView`s.
|
///Manages tracing of `WebView`s.
|
||||||
///In particular provides functionality for the app to enable/disable tracing of parts of code and to collect tracing data.
|
///In particular provides functionality for the app to enable/disable tracing of parts of code and to collect tracing data.
|
||||||
///This is useful for profiling performance issues, debugging and memory usage analysis in production and real life scenarios.
|
///This is useful for profiling performance issues, debugging and memory usage analysis in production and real life scenarios.
|
||||||
@ -25,8 +26,9 @@ class PlatformTracingControllerCreationParams {
|
|||||||
///The resulting trace data is sent back as a byte sequence in json format.
|
///The resulting trace data is sent back as a byte sequence in json format.
|
||||||
///This file can be loaded in "chrome://tracing" for further analysis.
|
///This file can be loaded in "chrome://tracing" for further analysis.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - TracingController](https://developer.android.com/reference/androidx/webkit/TracingController))
|
///- Android native WebView ([Official API - TracingController](https://developer.android.com/reference/androidx/webkit/TracingController))
|
||||||
|
///{@endtemplate}
|
||||||
abstract class PlatformTracingController extends PlatformInterface {
|
abstract class PlatformTracingController extends PlatformInterface {
|
||||||
/// Creates a new [PlatformTracingController]
|
/// Creates a new [PlatformTracingController]
|
||||||
factory PlatformTracingController(
|
factory PlatformTracingController(
|
||||||
@ -57,19 +59,22 @@ abstract class PlatformTracingController extends PlatformInterface {
|
|||||||
/// The parameters used to initialize the [PlatformTracingController].
|
/// The parameters used to initialize the [PlatformTracingController].
|
||||||
final PlatformTracingControllerCreationParams params;
|
final PlatformTracingControllerCreationParams params;
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformTracingController.start}
|
||||||
///Starts tracing all `WebView`s.
|
///Starts tracing all `WebView`s.
|
||||||
///Depending on the trace mode in trace config specifies how the trace events are recorded.
|
///Depending on the trace mode in trace config specifies how the trace events are recorded.
|
||||||
///For tracing modes [TracingMode.RECORD_UNTIL_FULL] and [TracingMode.RECORD_CONTINUOUSLY]
|
///For tracing modes [TracingMode.RECORD_UNTIL_FULL] and [TracingMode.RECORD_CONTINUOUSLY]
|
||||||
///the events are recorded using an internal buffer and flushed to the outputStream
|
///the events are recorded using an internal buffer and flushed to the outputStream
|
||||||
///when [stop] is called.
|
///when [stop] is called.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - TracingController.start](https://developer.android.com/reference/android/webkit/TracingController#start(android.webkit.TracingConfig)))
|
///- Android native WebView ([Official API - TracingController.start](https://developer.android.com/reference/android/webkit/TracingController#start(android.webkit.TracingConfig)))
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> start({required TracingSettings settings}) {
|
Future<void> start({required TracingSettings settings}) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'start is not implemented on the current platform');
|
'start is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformTracingController.stop}
|
||||||
///Stops tracing and flushes tracing data to the specified output stream.
|
///Stops tracing and flushes tracing data to the specified output stream.
|
||||||
///The data is sent to the specified output stream in json format typically in
|
///The data is sent to the specified output stream in json format typically in
|
||||||
///chunks.
|
///chunks.
|
||||||
@ -77,16 +82,19 @@ abstract class PlatformTracingController extends PlatformInterface {
|
|||||||
///Returns `false` if the WebView framework was not tracing at the time of the call,
|
///Returns `false` if the WebView framework was not tracing at the time of the call,
|
||||||
///`true` otherwise.
|
///`true` otherwise.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - TracingController.stop](https://developer.android.com/reference/android/webkit/TracingController#stop(java.io.OutputStream,%20java.util.concurrent.Executor)))
|
///- Android native WebView ([Official API - TracingController.stop](https://developer.android.com/reference/android/webkit/TracingController#stop(java.io.OutputStream,%20java.util.concurrent.Executor)))
|
||||||
|
///{@endtemplate}
|
||||||
Future<bool> stop({String? filePath}) {
|
Future<bool> stop({String? filePath}) {
|
||||||
throw UnimplementedError('stop is not implemented on the current platform');
|
throw UnimplementedError('stop is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformTracingController.isTracing}
|
||||||
///Returns whether the WebView framework is tracing.
|
///Returns whether the WebView framework is tracing.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - TracingController.isTracing](https://developer.android.com/reference/android/webkit/TracingController#isTracing()))
|
///- Android native WebView ([Official API - TracingController.isTracing](https://developer.android.com/reference/android/webkit/TracingController#isTracing()))
|
||||||
|
///{@endtemplate}
|
||||||
Future<bool> isTracing() {
|
Future<bool> isTracing() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'isTracing is not implemented on the current platform');
|
'isTracing is not implemented on the current platform');
|
||||||
@ -122,7 +130,7 @@ List<dynamic> _serializeCategories(List<dynamic> categories) {
|
|||||||
|
|
||||||
///Class that represents the settings used to configure the [PlatformTracingController].
|
///Class that represents the settings used to configure the [PlatformTracingController].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - TracingConfig](https://developer.android.com/reference/androidx/webkit/TracingConfig))
|
///- Android native WebView ([Official API - TracingConfig](https://developer.android.com/reference/androidx/webkit/TracingConfig))
|
||||||
@ExchangeableObject(copyMethod: true)
|
@ExchangeableObject(copyMethod: true)
|
||||||
class TracingSettings_ {
|
class TracingSettings_ {
|
||||||
|
@ -8,7 +8,7 @@ part of 'platform_tracing_controller.dart';
|
|||||||
|
|
||||||
///Class that represents the settings used to configure the [PlatformTracingController].
|
///Class that represents the settings used to configure the [PlatformTracingController].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - TracingConfig](https://developer.android.com/reference/androidx/webkit/TracingConfig))
|
///- Android native WebView ([Official API - TracingConfig](https://developer.android.com/reference/androidx/webkit/TracingConfig))
|
||||||
class TracingSettings {
|
class TracingSettings {
|
||||||
///Adds predefined [TracingCategory] and/or custom [String] sets of categories to be included in the trace output.
|
///Adds predefined [TracingCategory] and/or custom [String] sets of categories to be included in the trace output.
|
||||||
|
@ -7,7 +7,7 @@ import 'types/web_resource_response.dart';
|
|||||||
|
|
||||||
part 'platform_webview_asset_loader.g.dart';
|
part 'platform_webview_asset_loader.g.dart';
|
||||||
|
|
||||||
///Helper class to load local files including application's static assets and resources using http(s):// URLs inside a [WebView] class.
|
///Helper class to load local files including application's static assets and resources using http(s):// URLs inside a `WebView` class.
|
||||||
///Loading local files using web-like URLs instead of `file://` is desirable as it is compatible with the Same-Origin policy.
|
///Loading local files using web-like URLs instead of `file://` is desirable as it is compatible with the Same-Origin policy.
|
||||||
///
|
///
|
||||||
///For more context about application's assets and resources and how to normally access them please refer to
|
///For more context about application's assets and resources and how to normally access them please refer to
|
||||||
@ -17,7 +17,7 @@ part 'platform_webview_asset_loader.g.dart';
|
|||||||
///This means that local files should only be hosted on domains your organization owns
|
///This means that local files should only be hosted on domains your organization owns
|
||||||
///(at paths reserved for this purpose) or the default domain reserved for this: `appassets.androidplatform.net`.
|
///(at paths reserved for this purpose) or the default domain reserved for this: `appassets.androidplatform.net`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
@ExchangeableObject(copyMethod: true)
|
@ExchangeableObject(copyMethod: true)
|
||||||
class WebViewAssetLoader_ {
|
class WebViewAssetLoader_ {
|
||||||
@ -41,6 +41,7 @@ class WebViewAssetLoader_ {
|
|||||||
WebViewAssetLoader_({this.domain, this.httpAllowed, this.pathHandlers});
|
WebViewAssetLoader_({this.domain, this.httpAllowed, this.pathHandlers});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///[PlatformPathHandler] interface.
|
||||||
abstract class IPathHandler {
|
abstract class IPathHandler {
|
||||||
String get path {
|
String get path {
|
||||||
throw UnimplementedError('path is not implemented on the current platform');
|
throw UnimplementedError('path is not implemented on the current platform');
|
||||||
@ -70,9 +71,11 @@ class PlatformPathHandlerCreationParams {
|
|||||||
final String path;
|
final String path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformPathHandler}
|
||||||
///A handler that produces responses for a registered path.
|
///A handler that produces responses for a registered path.
|
||||||
///
|
///
|
||||||
///Implement this interface to handle other use-cases according to your app's needs.
|
///Implement this interface to handle other use-cases according to your app's needs.
|
||||||
|
///{@endtemplate}
|
||||||
abstract class PlatformPathHandler extends PlatformInterface
|
abstract class PlatformPathHandler extends PlatformInterface
|
||||||
implements IPathHandler {
|
implements IPathHandler {
|
||||||
/// Creates a new [PlatformWebViewAssetLoader]
|
/// Creates a new [PlatformWebViewAssetLoader]
|
||||||
@ -124,7 +127,9 @@ abstract class PlatformPathHandler extends PlatformInterface
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///Interface path handler events.
|
||||||
abstract class PlatformPathHandlerEvents {
|
abstract class PlatformPathHandlerEvents {
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformPathHandler.handle}
|
||||||
///Handles the requested URL by returning the appropriate response.
|
///Handles the requested URL by returning the appropriate response.
|
||||||
///
|
///
|
||||||
///Returning a `null` value means that the handler decided not to handle this path.
|
///Returning a `null` value means that the handler decided not to handle this path.
|
||||||
@ -133,6 +138,7 @@ abstract class PlatformPathHandlerEvents {
|
|||||||
///However, if the handler wants to save unnecessary processing either by another handler or by falling back to network,
|
///However, if the handler wants to save unnecessary processing either by another handler or by falling back to network,
|
||||||
///in cases like a file cannot be found, it may return a `WebResourceResponse(data: null)`
|
///in cases like a file cannot be found, it may return a `WebResourceResponse(data: null)`
|
||||||
///which is received as an HTTP response with status code `404` and no body.
|
///which is received as an HTTP response with status code `404` and no body.
|
||||||
|
///{@endtemplate}
|
||||||
Future<WebResourceResponse?> handle(String path) {
|
Future<WebResourceResponse?> handle(String path) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'handle is not implemented on the current platform');
|
'handle is not implemented on the current platform');
|
||||||
@ -160,6 +166,7 @@ class PlatformAssetsPathHandlerCreationParams
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformAssetsPathHandler}
|
||||||
///Handler class to open a file from assets directory in the application APK.
|
///Handler class to open a file from assets directory in the application APK.
|
||||||
///
|
///
|
||||||
///Opens the requested file from the application's assets directory.
|
///Opens the requested file from the application's assets directory.
|
||||||
@ -173,6 +180,7 @@ class PlatformAssetsPathHandlerCreationParams
|
|||||||
///[guessContentTypeFromName](https://developer.android.com/reference/java/net/URLConnection.html#guessContentTypeFromName-java.lang.String-).
|
///[guessContentTypeFromName](https://developer.android.com/reference/java/net/URLConnection.html#guessContentTypeFromName-java.lang.String-).
|
||||||
///Developers should ensure that asset files are named using standard file extensions.
|
///Developers should ensure that asset files are named using standard file extensions.
|
||||||
///If the file does not have a recognised extension, `text/plain` will be used by default.
|
///If the file does not have a recognised extension, `text/plain` will be used by default.
|
||||||
|
///{@endtemplate}
|
||||||
abstract class PlatformAssetsPathHandler extends PlatformPathHandler {
|
abstract class PlatformAssetsPathHandler extends PlatformPathHandler {
|
||||||
/// Creates a new [PlatformAssetsPathHandler]
|
/// Creates a new [PlatformAssetsPathHandler]
|
||||||
factory PlatformAssetsPathHandler(
|
factory PlatformAssetsPathHandler(
|
||||||
@ -228,6 +236,7 @@ class PlatformResourcesPathHandlerCreationParams
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformResourcesPathHandler}
|
||||||
///Handler class to open a file from resources directory in the application APK.
|
///Handler class to open a file from resources directory in the application APK.
|
||||||
///
|
///
|
||||||
///Opens the requested file from application's resources directory.
|
///Opens the requested file from application's resources directory.
|
||||||
@ -241,6 +250,7 @@ class PlatformResourcesPathHandlerCreationParams
|
|||||||
///[guessContentTypeFromName](https://developer.android.com/reference/java/net/URLConnection.html#guessContentTypeFromName-java.lang.String-).
|
///[guessContentTypeFromName](https://developer.android.com/reference/java/net/URLConnection.html#guessContentTypeFromName-java.lang.String-).
|
||||||
///Developers should ensure that asset files are named using standard file extensions.
|
///Developers should ensure that asset files are named using standard file extensions.
|
||||||
///If the file does not have a recognised extension, `text/plain` will be used by default.
|
///If the file does not have a recognised extension, `text/plain` will be used by default.
|
||||||
|
///{@endtemplate}
|
||||||
abstract class PlatformResourcesPathHandler extends PlatformPathHandler {
|
abstract class PlatformResourcesPathHandler extends PlatformPathHandler {
|
||||||
/// Creates a new [PlatformResourcesPathHandler]
|
/// Creates a new [PlatformResourcesPathHandler]
|
||||||
factory PlatformResourcesPathHandler(
|
factory PlatformResourcesPathHandler(
|
||||||
@ -302,6 +312,7 @@ class PlatformInternalStoragePathHandlerCreationParams
|
|||||||
final String directory;
|
final String directory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformInternalStoragePathHandler}
|
||||||
///Handler class to open files from application internal storage.
|
///Handler class to open files from application internal storage.
|
||||||
///For more information about android storage please refer to
|
///For more information about android storage please refer to
|
||||||
///[Android Developers Docs: Data and file storage overview](https://developer.android.com/guide/topics/data/data-storage).
|
///[Android Developers Docs: Data and file storage overview](https://developer.android.com/guide/topics/data/data-storage).
|
||||||
@ -320,6 +331,7 @@ class PlatformInternalStoragePathHandlerCreationParams
|
|||||||
///[guessContentTypeFromName](https://developer.android.com/reference/java/net/URLConnection.html#guessContentTypeFromName-java.lang.String-).
|
///[guessContentTypeFromName](https://developer.android.com/reference/java/net/URLConnection.html#guessContentTypeFromName-java.lang.String-).
|
||||||
///Developers should ensure that asset files are named using standard file extensions.
|
///Developers should ensure that asset files are named using standard file extensions.
|
||||||
///If the file does not have a recognised extension, `text/plain` will be used by default.
|
///If the file does not have a recognised extension, `text/plain` will be used by default.
|
||||||
|
///{@endtemplate}
|
||||||
abstract class PlatformInternalStoragePathHandler extends PlatformPathHandler {
|
abstract class PlatformInternalStoragePathHandler extends PlatformPathHandler {
|
||||||
/// Creates a new [PlatformResourcesPathHandler]
|
/// Creates a new [PlatformResourcesPathHandler]
|
||||||
factory PlatformInternalStoragePathHandler(
|
factory PlatformInternalStoragePathHandler(
|
||||||
|
@ -6,7 +6,7 @@ part of 'platform_webview_asset_loader.dart';
|
|||||||
// ExchangeableObjectGenerator
|
// ExchangeableObjectGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
///Helper class to load local files including application's static assets and resources using http(s):// URLs inside a [WebView] class.
|
///Helper class to load local files including application's static assets and resources using http(s):// URLs inside a `WebView` class.
|
||||||
///Loading local files using web-like URLs instead of `file://` is desirable as it is compatible with the Same-Origin policy.
|
///Loading local files using web-like URLs instead of `file://` is desirable as it is compatible with the Same-Origin policy.
|
||||||
///
|
///
|
||||||
///For more context about application's assets and resources and how to normally access them please refer to
|
///For more context about application's assets and resources and how to normally access them please refer to
|
||||||
@ -16,7 +16,7 @@ part of 'platform_webview_asset_loader.dart';
|
|||||||
///This means that local files should only be hosted on domains your organization owns
|
///This means that local files should only be hosted on domains your organization owns
|
||||||
///(at paths reserved for this purpose) or the default domain reserved for this: `appassets.androidplatform.net`.
|
///(at paths reserved for this purpose) or the default domain reserved for this: `appassets.androidplatform.net`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
class WebViewAssetLoader {
|
class WebViewAssetLoader {
|
||||||
///An unused domain reserved for Android applications to intercept requests for app assets.
|
///An unused domain reserved for Android applications to intercept requests for app assets.
|
||||||
|
@ -16,10 +16,12 @@ class PlatformWebViewFeatureCreationParams {
|
|||||||
const PlatformWebViewFeatureCreationParams();
|
const PlatformWebViewFeatureCreationParams();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewFeature}
|
||||||
///Class that represents an Android-specific utility class for checking which WebView Support Library features are supported on the device.
|
///Class that represents an Android-specific utility class for checking which WebView Support Library features are supported on the device.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
|
///{@endtemplate}
|
||||||
abstract class PlatformWebViewFeature extends PlatformInterface {
|
abstract class PlatformWebViewFeature extends PlatformInterface {
|
||||||
/// Creates a new [PlatformWebViewFeature]
|
/// Creates a new [PlatformWebViewFeature]
|
||||||
factory PlatformWebViewFeature(PlatformWebViewFeatureCreationParams params) {
|
factory PlatformWebViewFeature(PlatformWebViewFeatureCreationParams params) {
|
||||||
@ -64,6 +66,7 @@ abstract class PlatformWebViewFeature extends PlatformInterface {
|
|||||||
/// The parameters used to initialize the [PlatformWebViewFeature].
|
/// The parameters used to initialize the [PlatformWebViewFeature].
|
||||||
final PlatformWebViewFeatureCreationParams params;
|
final PlatformWebViewFeatureCreationParams params;
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewFeature.isFeatureSupported}
|
||||||
///Return whether a feature is supported at run-time. On devices running Android version `Build.VERSION_CODES.LOLLIPOP` and higher,
|
///Return whether a feature is supported at run-time. On devices running Android version `Build.VERSION_CODES.LOLLIPOP` and higher,
|
||||||
///this will check whether a feature is supported, depending on the combination of the desired feature, the Android version of device,
|
///this will check whether a feature is supported, depending on the combination of the desired feature, the Android version of device,
|
||||||
///and the WebView APK on the device. If running on a device with a lower API level, this will always return `false`.
|
///and the WebView APK on the device. If running on a device with a lower API level, this will always return `false`.
|
||||||
@ -77,11 +80,13 @@ abstract class PlatformWebViewFeature extends PlatformInterface {
|
|||||||
///Furthermore, if this method returns `false` for a particular feature, any callback guarded by that feature will not be invoked.
|
///Furthermore, if this method returns `false` for a particular feature, any callback guarded by that feature will not be invoked.
|
||||||
///
|
///
|
||||||
///**Official Android API**: https://developer.android.com/reference/androidx/webkit/WebViewFeature#isFeatureSupported(java.lang.String)
|
///**Official Android API**: https://developer.android.com/reference/androidx/webkit/WebViewFeature#isFeatureSupported(java.lang.String)
|
||||||
|
///{@endtemplate}
|
||||||
Future<bool> isFeatureSupported(WebViewFeature feature) {
|
Future<bool> isFeatureSupported(WebViewFeature feature) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'isFeatureSupported is not implemented on the current platform');
|
'isFeatureSupported is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformWebViewFeature.isStartupFeatureSupported}
|
||||||
///Return whether a startup feature is supported at run-time.
|
///Return whether a startup feature is supported at run-time.
|
||||||
///On devices running Android version `Build.VERSION_CODES.LOLLIPOP` and higher,
|
///On devices running Android version `Build.VERSION_CODES.LOLLIPOP` and higher,
|
||||||
///this will check whether a startup feature is supported,
|
///this will check whether a startup feature is supported,
|
||||||
@ -97,16 +102,14 @@ abstract class PlatformWebViewFeature extends PlatformInterface {
|
|||||||
///any callback guarded by that feature will not be invoked.
|
///any callback guarded by that feature will not be invoked.
|
||||||
///
|
///
|
||||||
///**Official Android API**: https://developer.android.com/reference/androidx/webkit/WebViewFeature#isFeatureSupported(java.lang.String)
|
///**Official Android API**: https://developer.android.com/reference/androidx/webkit/WebViewFeature#isFeatureSupported(java.lang.String)
|
||||||
|
///{@endtemplate}
|
||||||
Future<bool> isStartupFeatureSupported(WebViewFeature startupFeature) {
|
Future<bool> isStartupFeatureSupported(WebViewFeature startupFeature) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'isStartupFeatureSupported is not implemented on the current platform');
|
'isStartupFeatureSupported is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///Class that represents an Android-specific utility class for checking which WebView Support Library features are supported on the device.
|
///{@macro flutter_inappwebview_platform_interface.PlatformWebViewFeature}
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- Android native WebView
|
|
||||||
@ExchangeableEnum()
|
@ExchangeableEnum()
|
||||||
class WebViewFeature_ {
|
class WebViewFeature_ {
|
||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
@ -330,37 +333,11 @@ class WebViewFeature_ {
|
|||||||
const WebViewFeature_._internal(
|
const WebViewFeature_._internal(
|
||||||
"STARTUP_FEATURE_SET_DIRECTORY_BASE_PATHS");
|
"STARTUP_FEATURE_SET_DIRECTORY_BASE_PATHS");
|
||||||
|
|
||||||
///Return whether a feature is supported at run-time. On devices running Android version `Build.VERSION_CODES.LOLLIPOP` and higher,
|
///{@macro flutter_inappwebview_platform_interface.PlatformWebViewFeature.isFeatureSupported}
|
||||||
///this will check whether a feature is supported, depending on the combination of the desired feature, the Android version of device,
|
|
||||||
///and the WebView APK on the device. If running on a device with a lower API level, this will always return `false`.
|
|
||||||
///
|
|
||||||
///**Note**: This method is different from [isStartupFeatureSupported] and this
|
|
||||||
///method only accepts certain features.
|
|
||||||
///Please verify that the correct feature checking method is used for a particular feature.
|
|
||||||
///
|
|
||||||
///**Note**: If this method returns `false`, it is not safe to invoke the methods
|
|
||||||
///requiring the desired feature.
|
|
||||||
///Furthermore, if this method returns `false` for a particular feature, any callback guarded by that feature will not be invoked.
|
|
||||||
///
|
|
||||||
///**Official Android API**: https://developer.android.com/reference/androidx/webkit/WebViewFeature#isFeatureSupported(java.lang.String)
|
|
||||||
static Future<bool> isFeatureSupported(WebViewFeature feature) =>
|
static Future<bool> isFeatureSupported(WebViewFeature feature) =>
|
||||||
PlatformWebViewFeature.static().isFeatureSupported(feature);
|
PlatformWebViewFeature.static().isFeatureSupported(feature);
|
||||||
|
|
||||||
///Return whether a startup feature is supported at run-time.
|
///{@macro flutter_inappwebview_platform_interface.PlatformWebViewFeature.isStartupFeatureSupported}
|
||||||
///On devices running Android version `Build.VERSION_CODES.LOLLIPOP` and higher,
|
|
||||||
///this will check whether a startup feature is supported,
|
|
||||||
///depending on the combination of the desired feature,
|
|
||||||
///the Android version of device, and the WebView APK on the device.
|
|
||||||
///If running on a device with a lower API level, this will always return `false`.
|
|
||||||
///
|
|
||||||
///**Note**: This method is different from [isFeatureSupported] and this method only accepts startup features.
|
|
||||||
///Please verify that the correct feature checking method is used for a particular feature.
|
|
||||||
///
|
|
||||||
///**Note**: If this method returns `false`, it is not safe to invoke the methods requiring the desired feature.
|
|
||||||
///Furthermore, if this method returns `false` for a particular feature,
|
|
||||||
///any callback guarded by that feature will not be invoked.
|
|
||||||
///
|
|
||||||
///**Official Android API**: https://developer.android.com/reference/androidx/webkit/WebViewFeature#isFeatureSupported(java.lang.String)
|
|
||||||
static Future<bool> isStartupFeatureSupported(
|
static Future<bool> isStartupFeatureSupported(
|
||||||
WebViewFeature startupFeature) =>
|
WebViewFeature startupFeature) =>
|
||||||
PlatformWebViewFeature.static().isStartupFeatureSupported(startupFeature);
|
PlatformWebViewFeature.static().isStartupFeatureSupported(startupFeature);
|
||||||
|
@ -8,7 +8,7 @@ part of 'platform_webview_feature.dart';
|
|||||||
|
|
||||||
///Class that represents an Android-specific utility class for checking which WebView Support Library features are supported on the device.
|
///Class that represents an Android-specific utility class for checking which WebView Support Library features are supported on the device.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
class WebViewFeature {
|
class WebViewFeature {
|
||||||
final String _value;
|
final String _value;
|
||||||
|
@ -26,12 +26,14 @@ class PlatformPrintJobControllerCreationParams {
|
|||||||
final PrintJobCompletionHandler? onComplete;
|
final PrintJobCompletionHandler? onComplete;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformPrintJobController}
|
||||||
///Class representing a print job eventually returned by [PlatformInAppWebViewController.printCurrentPage].
|
///Class representing a print job eventually returned by [PlatformInAppWebViewController.printCurrentPage].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
|
///{@endtemplate}
|
||||||
abstract class PlatformPrintJobController extends PlatformInterface
|
abstract class PlatformPrintJobController extends PlatformInterface
|
||||||
implements Disposable {
|
implements Disposable {
|
||||||
/// Creates a new [PlatformPrintJobController]
|
/// Creates a new [PlatformPrintJobController]
|
||||||
@ -70,32 +72,37 @@ abstract class PlatformPrintJobController extends PlatformInterface
|
|||||||
///{@template flutter_inappwebview_platform_interface.PlatformPrintJobController.onComplete}
|
///{@template flutter_inappwebview_platform_interface.PlatformPrintJobController.onComplete}
|
||||||
///A completion handler used to handle the conclusion of the print job (for instance, to reset state) and to handle any errors encountered in printing.
|
///A completion handler used to handle the conclusion of the print job (for instance, to reset state) and to handle any errors encountered in printing.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - UIPrintInteractionController.CompletionHandler](https://developer.apple.com/documentation/uikit/uiprintinteractioncontroller/completionhandler))
|
///- iOS ([Official API - UIPrintInteractionController.CompletionHandler](https://developer.apple.com/documentation/uikit/uiprintinteractioncontroller/completionhandler))
|
||||||
///- MacOS ([Official API - NSPrintOperation.runModal](https://developer.apple.com/documentation/appkit/nsprintoperation/1532065-runmodal))
|
///- MacOS ([Official API - NSPrintOperation.runModal](https://developer.apple.com/documentation/appkit/nsprintoperation/1532065-runmodal))
|
||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
PrintJobCompletionHandler? get onComplete => params.onComplete;
|
PrintJobCompletionHandler? get onComplete => params.onComplete;
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformPrintJobController.cancel}
|
||||||
///Cancels this print job.
|
///Cancels this print job.
|
||||||
///You can request cancellation of a queued, started, blocked, or failed print job.
|
///You can request cancellation of a queued, started, blocked, or failed print job.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - PrintJob.cancel](https://developer.android.com/reference/android/print/PrintJob#cancel()))
|
///- Android native WebView ([Official API - PrintJob.cancel](https://developer.android.com/reference/android/print/PrintJob#cancel()))
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> cancel() {
|
Future<void> cancel() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'cancel is not implemented on the current platform');
|
'cancel is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformPrintJobController.restart}
|
||||||
///Restarts this print job.
|
///Restarts this print job.
|
||||||
///You can request restart of a failed print job.
|
///You can request restart of a failed print job.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - PrintJob.restart](https://developer.android.com/reference/android/print/PrintJob#restart()))
|
///- Android native WebView ([Official API - PrintJob.restart](https://developer.android.com/reference/android/print/PrintJob#restart()))
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> restart() {
|
Future<void> restart() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'restart is not implemented on the current platform');
|
'restart is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformPrintJobController.dismiss}
|
||||||
///Dismisses the printing-options sheet or popover.
|
///Dismisses the printing-options sheet or popover.
|
||||||
///
|
///
|
||||||
///You should dismiss the printing options when they are presented in a sheet or
|
///You should dismiss the printing options when they are presented in a sheet or
|
||||||
@ -103,28 +110,39 @@ abstract class PlatformPrintJobController extends PlatformInterface
|
|||||||
///(This, of course, assumes your application responds to orientation changes.)
|
///(This, of course, assumes your application responds to orientation changes.)
|
||||||
///You should then present the printing options again once the new orientation takes effect.
|
///You should then present the printing options again once the new orientation takes effect.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> dismiss({bool animated = true}) {
|
Future<void> dismiss({bool animated = true}) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'dismiss is not implemented on the current platform');
|
'dismiss is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformPrintJobController.getInfo}
|
||||||
///Gets the [PrintJobInfo] that describes this job.
|
///Gets the [PrintJobInfo] that describes this job.
|
||||||
///
|
///
|
||||||
///**NOTE**: The returned info object is a snapshot of the
|
///**NOTE**: The returned info object is a snapshot of the
|
||||||
///current print job state. Every call to this method returns a fresh
|
///current print job state. Every call to this method returns a fresh
|
||||||
///info object that reflects the current print job state.
|
///info object that reflects the current print job state.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - PrintJob.getInfo](https://developer.android.com/reference/android/print/PrintJob#getInfo()))
|
///- Android native WebView ([Official API - PrintJob.getInfo](https://developer.android.com/reference/android/print/PrintJob#getInfo()))
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
|
///{@endtemplate}
|
||||||
Future<PrintJobInfo?> getInfo() {
|
Future<PrintJobInfo?> getInfo() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'getInfo is not implemented on the current platform');
|
'getInfo is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformPrintJobController.dispose}
|
||||||
|
///Disposes the print job.
|
||||||
|
///
|
||||||
|
///**Officially Supported Platforms/Implementations**:
|
||||||
|
///- Android native WebView
|
||||||
|
///- iOS
|
||||||
|
///- MacOS
|
||||||
|
///{@endtemplate}
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
|
@ -25,7 +25,7 @@ class PrintJobSettings_ {
|
|||||||
///Otherwise, it will be handled and disposed automatically by the system.
|
///Otherwise, it will be handled and disposed automatically by the system.
|
||||||
///The default value is `false`.
|
///The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -35,7 +35,7 @@ class PrintJobSettings_ {
|
|||||||
///An application should set this property to a name appropriate to the content being printed.
|
///An application should set this property to a name appropriate to the content being printed.
|
||||||
///The default job name is the current webpage title concatenated with the "Document" word at the end.
|
///The default job name is the current webpage title concatenated with the "Document" word at the end.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -43,13 +43,13 @@ class PrintJobSettings_ {
|
|||||||
|
|
||||||
///`true` to animate the display of the sheet, `false` to display the sheet immediately.
|
///`true` to animate the display of the sheet, `false` to display the sheet immediately.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
bool? animated;
|
bool? animated;
|
||||||
|
|
||||||
///The orientation of the printed content, portrait or landscape.
|
///The orientation of the printed content, portrait or landscape.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -57,7 +57,7 @@ class PrintJobSettings_ {
|
|||||||
|
|
||||||
///The number of pages to render.
|
///The number of pages to render.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
int? numberOfPages;
|
int? numberOfPages;
|
||||||
@ -66,7 +66,7 @@ class PrintJobSettings_ {
|
|||||||
///
|
///
|
||||||
///**NOTE for iOS**: available only on iOS 14.5+.
|
///**NOTE for iOS**: available only on iOS 14.5+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
PrintJobRenderingQuality_? forceRenderingQuality;
|
PrintJobRenderingQuality_? forceRenderingQuality;
|
||||||
|
|
||||||
@ -74,20 +74,20 @@ class PrintJobSettings_ {
|
|||||||
///Margins define the white space around the content where the left margin defines
|
///Margins define the white space around the content where the left margin defines
|
||||||
///the amount of white space on the left of the content and so on.
|
///the amount of white space on the left of the content and so on.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
EdgeInsets? margins;
|
EdgeInsets? margins;
|
||||||
|
|
||||||
///The media size.
|
///The media size.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
PrintJobMediaSize_? mediaSize;
|
PrintJobMediaSize_? mediaSize;
|
||||||
|
|
||||||
///The color mode.
|
///The color mode.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- MacOS
|
///- MacOS
|
||||||
PrintJobColorMode_? colorMode;
|
PrintJobColorMode_? colorMode;
|
||||||
@ -96,27 +96,27 @@ class PrintJobSettings_ {
|
|||||||
///
|
///
|
||||||
///**NOTE for Android native WebView**: available only on Android 23+.
|
///**NOTE for Android native WebView**: available only on Android 23+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
PrintJobDuplexMode_? duplexMode;
|
PrintJobDuplexMode_? duplexMode;
|
||||||
|
|
||||||
///The kind of printable content.
|
///The kind of printable content.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
PrintJobOutputType_? outputType;
|
PrintJobOutputType_? outputType;
|
||||||
|
|
||||||
///The supported resolution in DPI (dots per inch).
|
///The supported resolution in DPI (dots per inch).
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
PrintJobResolution_? resolution;
|
PrintJobResolution_? resolution;
|
||||||
|
|
||||||
///A Boolean value that determines whether the printing options include the number of copies.
|
///A Boolean value that determines whether the printing options include the number of copies.
|
||||||
///The default value is `true`.
|
///The default value is `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
bool? showsNumberOfCopies;
|
bool? showsNumberOfCopies;
|
||||||
@ -126,7 +126,7 @@ class PrintJobSettings_ {
|
|||||||
///Setting the value to `true` enables a paper selection menu on printers that support different types of paper and have more than one paper type loaded.
|
///Setting the value to `true` enables a paper selection menu on printers that support different types of paper and have more than one paper type loaded.
|
||||||
///On printers where only one paper type is available, no paper selection menu is displayed, regardless of the value of this property.
|
///On printers where only one paper type is available, no paper selection menu is displayed, regardless of the value of this property.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
bool? showsPaperSelectionForLoadedPapers;
|
bool? showsPaperSelectionForLoadedPapers;
|
||||||
|
|
||||||
@ -135,7 +135,7 @@ class PrintJobSettings_ {
|
|||||||
///
|
///
|
||||||
///**NOTE for iOS**: available only on iOS 15.0+.
|
///**NOTE for iOS**: available only on iOS 15.0+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
bool? showsPaperOrientation;
|
bool? showsPaperOrientation;
|
||||||
@ -143,42 +143,42 @@ class PrintJobSettings_ {
|
|||||||
///A Boolean value that determines whether the print panel includes a control for manipulating the paper size of the printer.
|
///A Boolean value that determines whether the print panel includes a control for manipulating the paper size of the printer.
|
||||||
///The default value is `true`.
|
///The default value is `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
bool? showsPaperSize;
|
bool? showsPaperSize;
|
||||||
|
|
||||||
///A Boolean value that determines whether the Print panel includes a control for scaling the printed output.
|
///A Boolean value that determines whether the Print panel includes a control for scaling the printed output.
|
||||||
///The default value is `true`.
|
///The default value is `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
bool? showsScaling;
|
bool? showsScaling;
|
||||||
|
|
||||||
///A Boolean value that determines whether the Print panel includes a set of fields for manipulating the range of pages being printed.
|
///A Boolean value that determines whether the Print panel includes a set of fields for manipulating the range of pages being printed.
|
||||||
///The default value is `true`.
|
///The default value is `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
bool? showsPageRange;
|
bool? showsPageRange;
|
||||||
|
|
||||||
///A Boolean value that determines whether the Print panel includes a separate accessory view for manipulating the paper size, orientation, and scaling attributes.
|
///A Boolean value that determines whether the Print panel includes a separate accessory view for manipulating the paper size, orientation, and scaling attributes.
|
||||||
///The default value is `true`.
|
///The default value is `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
bool? showsPageSetupAccessory;
|
bool? showsPageSetupAccessory;
|
||||||
|
|
||||||
///A Boolean value that determines whether the Print panel displays a built-in preview of the document contents.
|
///A Boolean value that determines whether the Print panel displays a built-in preview of the document contents.
|
||||||
///The default value is `true`.
|
///The default value is `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
bool? showsPreview;
|
bool? showsPreview;
|
||||||
|
|
||||||
///A Boolean value that determines whether the Print panel includes an additional selection option for paper range.
|
///A Boolean value that determines whether the Print panel includes an additional selection option for paper range.
|
||||||
///The default value is `true`.
|
///The default value is `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
bool? showsPrintSelection;
|
bool? showsPrintSelection;
|
||||||
|
|
||||||
@ -189,7 +189,7 @@ class PrintJobSettings_ {
|
|||||||
///that operation is controlled by the [showsProgressPanel] property.
|
///that operation is controlled by the [showsProgressPanel] property.
|
||||||
///Operations that generate EPS or PDF data do no display a progress panel, regardless of the value in the flag parameter.
|
///Operations that generate EPS or PDF data do no display a progress panel, regardless of the value in the flag parameter.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
bool? showsPrintPanel;
|
bool? showsPrintPanel;
|
||||||
|
|
||||||
@ -200,7 +200,7 @@ class PrintJobSettings_ {
|
|||||||
///that operation is controlled by the [showsPrintPanel] property.
|
///that operation is controlled by the [showsPrintPanel] property.
|
||||||
///Operations that generate EPS or PDF data do no display a progress panel, regardless of the value in the flag parameter.
|
///Operations that generate EPS or PDF data do no display a progress panel, regardless of the value in the flag parameter.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
bool? showsProgressPanel;
|
bool? showsProgressPanel;
|
||||||
|
|
||||||
@ -209,7 +209,7 @@ class PrintJobSettings_ {
|
|||||||
///The footer is measured in points from the bottom of [printableRect] and is below the content area.
|
///The footer is measured in points from the bottom of [printableRect] and is below the content area.
|
||||||
///The default footer height is `0.0`.
|
///The default footer height is `0.0`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
double? footerHeight;
|
double? footerHeight;
|
||||||
|
|
||||||
@ -218,7 +218,7 @@ class PrintJobSettings_ {
|
|||||||
///The header is measured in points from the top of [printableRect] and is above the content area.
|
///The header is measured in points from the top of [printableRect] and is above the content area.
|
||||||
///The default header height is `0.0`.
|
///The default header height is `0.0`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
double? headerHeight;
|
double? headerHeight;
|
||||||
|
|
||||||
@ -229,7 +229,7 @@ class PrintJobSettings_ {
|
|||||||
///the top inset value; it uses the lower of the two values.
|
///the top inset value; it uses the lower of the two values.
|
||||||
///The default value of this property is the maximum float value.
|
///The default value of this property is the maximum float value.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
double? maximumContentHeight;
|
double? maximumContentHeight;
|
||||||
|
|
||||||
@ -239,133 +239,133 @@ class PrintJobSettings_ {
|
|||||||
///It compares the value of this property with the printing rectangle’s width minus the left and right inset values and uses the lower of the two.
|
///It compares the value of this property with the printing rectangle’s width minus the left and right inset values and uses the lower of the two.
|
||||||
///The default value of this property is the maximum float value.
|
///The default value of this property is the maximum float value.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
double? maximumContentWidth;
|
double? maximumContentWidth;
|
||||||
|
|
||||||
///The current scaling factor. From `0.0` to `1.0`.
|
///The current scaling factor. From `0.0` to `1.0`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
double? scalingFactor;
|
double? scalingFactor;
|
||||||
|
|
||||||
///The action specified for the job.
|
///The action specified for the job.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
PrintJobDisposition_? jobDisposition;
|
PrintJobDisposition_? jobDisposition;
|
||||||
|
|
||||||
///An URL containing the location to which the job file will be saved when the [jobDisposition] is [PrintJobDisposition.SAVE].
|
///An URL containing the location to which the job file will be saved when the [jobDisposition] is [PrintJobDisposition.SAVE].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
WebUri? jobSavingURL;
|
WebUri? jobSavingURL;
|
||||||
|
|
||||||
///The name of the currently selected paper size.
|
///The name of the currently selected paper size.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
String? paperName;
|
String? paperName;
|
||||||
|
|
||||||
///The horizontal pagination mode.
|
///The horizontal pagination mode.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
PrintJobPaginationMode_? horizontalPagination;
|
PrintJobPaginationMode_? horizontalPagination;
|
||||||
|
|
||||||
///The vertical pagination to the specified mode.
|
///The vertical pagination to the specified mode.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
PrintJobPaginationMode_? verticalPagination;
|
PrintJobPaginationMode_? verticalPagination;
|
||||||
|
|
||||||
///Indicates whether the image is centered horizontally.
|
///Indicates whether the image is centered horizontally.
|
||||||
///The default value is `true`.
|
///The default value is `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
bool? isHorizontallyCentered;
|
bool? isHorizontallyCentered;
|
||||||
|
|
||||||
///Indicates whether the image is centered vertically.
|
///Indicates whether the image is centered vertically.
|
||||||
///The default value is `true`.
|
///The default value is `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
bool? isVerticallyCentered;
|
bool? isVerticallyCentered;
|
||||||
|
|
||||||
///The print order for the pages of the operation.
|
///The print order for the pages of the operation.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
PrintJobPageOrder_? pageOrder;
|
PrintJobPageOrder_? pageOrder;
|
||||||
|
|
||||||
///Whether the print operation should spawn a separate thread in which to run itself.
|
///Whether the print operation should spawn a separate thread in which to run itself.
|
||||||
///The default value is `true`.
|
///The default value is `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
bool? canSpawnSeparateThread;
|
bool? canSpawnSeparateThread;
|
||||||
|
|
||||||
///How many copies to print.
|
///How many copies to print.
|
||||||
///The default value is `1`.
|
///The default value is `1`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
int? copies;
|
int? copies;
|
||||||
|
|
||||||
///An integer value that specifies the first page in the print job.
|
///An integer value that specifies the first page in the print job.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
int? firstPage;
|
int? firstPage;
|
||||||
|
|
||||||
///An integer value that specifies the last page in the print job.
|
///An integer value that specifies the last page in the print job.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
int? lastPage;
|
int? lastPage;
|
||||||
|
|
||||||
///If `true`, produce detailed reports when an error occurs.
|
///If `true`, produce detailed reports when an error occurs.
|
||||||
///The default value is `false`.
|
///The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
bool? detailedErrorReporting;
|
bool? detailedErrorReporting;
|
||||||
|
|
||||||
///A fax number.
|
///A fax number.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
String? faxNumber;
|
String? faxNumber;
|
||||||
|
|
||||||
///If `true`, a standard header and footer are added outside the margins of each page.
|
///If `true`, a standard header and footer are added outside the margins of each page.
|
||||||
///The default value is `true`.
|
///The default value is `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
bool? headerAndFooter;
|
bool? headerAndFooter;
|
||||||
|
|
||||||
///If `true`, collates output.
|
///If `true`, collates output.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
bool? mustCollate;
|
bool? mustCollate;
|
||||||
|
|
||||||
///The number of logical pages to be tiled horizontally on a physical sheet of paper.
|
///The number of logical pages to be tiled horizontally on a physical sheet of paper.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
int? pagesAcross;
|
int? pagesAcross;
|
||||||
|
|
||||||
///The number of logical pages to be tiled vertically on a physical sheet of paper.
|
///The number of logical pages to be tiled vertically on a physical sheet of paper.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
int? pagesDown;
|
int? pagesDown;
|
||||||
|
|
||||||
///A timestamp that specifies the time at which printing should begin.
|
///A timestamp that specifies the time at which printing should begin.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
int? time;
|
int? time;
|
||||||
|
|
||||||
|
@ -10,20 +10,20 @@ part of 'print_job_settings.dart';
|
|||||||
class PrintJobSettings {
|
class PrintJobSettings {
|
||||||
///`true` to animate the display of the sheet, `false` to display the sheet immediately.
|
///`true` to animate the display of the sheet, `false` to display the sheet immediately.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
bool? animated;
|
bool? animated;
|
||||||
|
|
||||||
///Whether the print operation should spawn a separate thread in which to run itself.
|
///Whether the print operation should spawn a separate thread in which to run itself.
|
||||||
///The default value is `true`.
|
///The default value is `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
bool? canSpawnSeparateThread;
|
bool? canSpawnSeparateThread;
|
||||||
|
|
||||||
///The color mode.
|
///The color mode.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- MacOS
|
///- MacOS
|
||||||
PrintJobColorMode? colorMode;
|
PrintJobColorMode? colorMode;
|
||||||
@ -31,14 +31,14 @@ class PrintJobSettings {
|
|||||||
///How many copies to print.
|
///How many copies to print.
|
||||||
///The default value is `1`.
|
///The default value is `1`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
int? copies;
|
int? copies;
|
||||||
|
|
||||||
///If `true`, produce detailed reports when an error occurs.
|
///If `true`, produce detailed reports when an error occurs.
|
||||||
///The default value is `false`.
|
///The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
bool? detailedErrorReporting;
|
bool? detailedErrorReporting;
|
||||||
|
|
||||||
@ -46,20 +46,20 @@ class PrintJobSettings {
|
|||||||
///
|
///
|
||||||
///**NOTE for Android native WebView**: available only on Android 23+.
|
///**NOTE for Android native WebView**: available only on Android 23+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
PrintJobDuplexMode? duplexMode;
|
PrintJobDuplexMode? duplexMode;
|
||||||
|
|
||||||
///A fax number.
|
///A fax number.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
String? faxNumber;
|
String? faxNumber;
|
||||||
|
|
||||||
///An integer value that specifies the first page in the print job.
|
///An integer value that specifies the first page in the print job.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
int? firstPage;
|
int? firstPage;
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ class PrintJobSettings {
|
|||||||
///The footer is measured in points from the bottom of [printableRect] and is below the content area.
|
///The footer is measured in points from the bottom of [printableRect] and is below the content area.
|
||||||
///The default footer height is `0.0`.
|
///The default footer height is `0.0`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
double? footerHeight;
|
double? footerHeight;
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ class PrintJobSettings {
|
|||||||
///
|
///
|
||||||
///**NOTE for iOS**: available only on iOS 14.5+.
|
///**NOTE for iOS**: available only on iOS 14.5+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
PrintJobRenderingQuality? forceRenderingQuality;
|
PrintJobRenderingQuality? forceRenderingQuality;
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ class PrintJobSettings {
|
|||||||
///Otherwise, it will be handled and disposed automatically by the system.
|
///Otherwise, it will be handled and disposed automatically by the system.
|
||||||
///The default value is `false`.
|
///The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -93,7 +93,7 @@ class PrintJobSettings {
|
|||||||
///If `true`, a standard header and footer are added outside the margins of each page.
|
///If `true`, a standard header and footer are added outside the margins of each page.
|
||||||
///The default value is `true`.
|
///The default value is `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
bool? headerAndFooter;
|
bool? headerAndFooter;
|
||||||
|
|
||||||
@ -102,33 +102,33 @@ class PrintJobSettings {
|
|||||||
///The header is measured in points from the top of [printableRect] and is above the content area.
|
///The header is measured in points from the top of [printableRect] and is above the content area.
|
||||||
///The default header height is `0.0`.
|
///The default header height is `0.0`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
double? headerHeight;
|
double? headerHeight;
|
||||||
|
|
||||||
///The horizontal pagination mode.
|
///The horizontal pagination mode.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
PrintJobPaginationMode? horizontalPagination;
|
PrintJobPaginationMode? horizontalPagination;
|
||||||
|
|
||||||
///Indicates whether the image is centered horizontally.
|
///Indicates whether the image is centered horizontally.
|
||||||
///The default value is `true`.
|
///The default value is `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
bool? isHorizontallyCentered;
|
bool? isHorizontallyCentered;
|
||||||
|
|
||||||
///Indicates whether the image is centered vertically.
|
///Indicates whether the image is centered vertically.
|
||||||
///The default value is `true`.
|
///The default value is `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
bool? isVerticallyCentered;
|
bool? isVerticallyCentered;
|
||||||
|
|
||||||
///The action specified for the job.
|
///The action specified for the job.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
PrintJobDisposition? jobDisposition;
|
PrintJobDisposition? jobDisposition;
|
||||||
|
|
||||||
@ -136,7 +136,7 @@ class PrintJobSettings {
|
|||||||
///An application should set this property to a name appropriate to the content being printed.
|
///An application should set this property to a name appropriate to the content being printed.
|
||||||
///The default job name is the current webpage title concatenated with the "Document" word at the end.
|
///The default job name is the current webpage title concatenated with the "Document" word at the end.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -144,13 +144,13 @@ class PrintJobSettings {
|
|||||||
|
|
||||||
///An URL containing the location to which the job file will be saved when the [jobDisposition] is [PrintJobDisposition.SAVE].
|
///An URL containing the location to which the job file will be saved when the [jobDisposition] is [PrintJobDisposition.SAVE].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
WebUri? jobSavingURL;
|
WebUri? jobSavingURL;
|
||||||
|
|
||||||
///An integer value that specifies the last page in the print job.
|
///An integer value that specifies the last page in the print job.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
int? lastPage;
|
int? lastPage;
|
||||||
|
|
||||||
@ -158,7 +158,7 @@ class PrintJobSettings {
|
|||||||
///Margins define the white space around the content where the left margin defines
|
///Margins define the white space around the content where the left margin defines
|
||||||
///the amount of white space on the left of the content and so on.
|
///the amount of white space on the left of the content and so on.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
EdgeInsets? margins;
|
EdgeInsets? margins;
|
||||||
@ -170,7 +170,7 @@ class PrintJobSettings {
|
|||||||
///the top inset value; it uses the lower of the two values.
|
///the top inset value; it uses the lower of the two values.
|
||||||
///The default value of this property is the maximum float value.
|
///The default value of this property is the maximum float value.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
double? maximumContentHeight;
|
double? maximumContentHeight;
|
||||||
|
|
||||||
@ -180,32 +180,32 @@ class PrintJobSettings {
|
|||||||
///It compares the value of this property with the printing rectangle’s width minus the left and right inset values and uses the lower of the two.
|
///It compares the value of this property with the printing rectangle’s width minus the left and right inset values and uses the lower of the two.
|
||||||
///The default value of this property is the maximum float value.
|
///The default value of this property is the maximum float value.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
double? maximumContentWidth;
|
double? maximumContentWidth;
|
||||||
|
|
||||||
///The media size.
|
///The media size.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
PrintJobMediaSize? mediaSize;
|
PrintJobMediaSize? mediaSize;
|
||||||
|
|
||||||
///If `true`, collates output.
|
///If `true`, collates output.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
bool? mustCollate;
|
bool? mustCollate;
|
||||||
|
|
||||||
///The number of pages to render.
|
///The number of pages to render.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
int? numberOfPages;
|
int? numberOfPages;
|
||||||
|
|
||||||
///The orientation of the printed content, portrait or landscape.
|
///The orientation of the printed content, portrait or landscape.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -213,50 +213,50 @@ class PrintJobSettings {
|
|||||||
|
|
||||||
///The kind of printable content.
|
///The kind of printable content.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
PrintJobOutputType? outputType;
|
PrintJobOutputType? outputType;
|
||||||
|
|
||||||
///The print order for the pages of the operation.
|
///The print order for the pages of the operation.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
PrintJobPageOrder? pageOrder;
|
PrintJobPageOrder? pageOrder;
|
||||||
|
|
||||||
///The number of logical pages to be tiled horizontally on a physical sheet of paper.
|
///The number of logical pages to be tiled horizontally on a physical sheet of paper.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
int? pagesAcross;
|
int? pagesAcross;
|
||||||
|
|
||||||
///The number of logical pages to be tiled vertically on a physical sheet of paper.
|
///The number of logical pages to be tiled vertically on a physical sheet of paper.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
int? pagesDown;
|
int? pagesDown;
|
||||||
|
|
||||||
///The name of the currently selected paper size.
|
///The name of the currently selected paper size.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
String? paperName;
|
String? paperName;
|
||||||
|
|
||||||
///The supported resolution in DPI (dots per inch).
|
///The supported resolution in DPI (dots per inch).
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
PrintJobResolution? resolution;
|
PrintJobResolution? resolution;
|
||||||
|
|
||||||
///The current scaling factor. From `0.0` to `1.0`.
|
///The current scaling factor. From `0.0` to `1.0`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
double? scalingFactor;
|
double? scalingFactor;
|
||||||
|
|
||||||
///A Boolean value that determines whether the printing options include the number of copies.
|
///A Boolean value that determines whether the printing options include the number of copies.
|
||||||
///The default value is `true`.
|
///The default value is `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
bool? showsNumberOfCopies;
|
bool? showsNumberOfCopies;
|
||||||
@ -264,14 +264,14 @@ class PrintJobSettings {
|
|||||||
///A Boolean value that determines whether the Print panel includes a set of fields for manipulating the range of pages being printed.
|
///A Boolean value that determines whether the Print panel includes a set of fields for manipulating the range of pages being printed.
|
||||||
///The default value is `true`.
|
///The default value is `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
bool? showsPageRange;
|
bool? showsPageRange;
|
||||||
|
|
||||||
///A Boolean value that determines whether the Print panel includes a separate accessory view for manipulating the paper size, orientation, and scaling attributes.
|
///A Boolean value that determines whether the Print panel includes a separate accessory view for manipulating the paper size, orientation, and scaling attributes.
|
||||||
///The default value is `true`.
|
///The default value is `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
bool? showsPageSetupAccessory;
|
bool? showsPageSetupAccessory;
|
||||||
|
|
||||||
@ -280,7 +280,7 @@ class PrintJobSettings {
|
|||||||
///
|
///
|
||||||
///**NOTE for iOS**: available only on iOS 15.0+.
|
///**NOTE for iOS**: available only on iOS 15.0+.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
bool? showsPaperOrientation;
|
bool? showsPaperOrientation;
|
||||||
@ -290,21 +290,21 @@ class PrintJobSettings {
|
|||||||
///Setting the value to `true` enables a paper selection menu on printers that support different types of paper and have more than one paper type loaded.
|
///Setting the value to `true` enables a paper selection menu on printers that support different types of paper and have more than one paper type loaded.
|
||||||
///On printers where only one paper type is available, no paper selection menu is displayed, regardless of the value of this property.
|
///On printers where only one paper type is available, no paper selection menu is displayed, regardless of the value of this property.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
bool? showsPaperSelectionForLoadedPapers;
|
bool? showsPaperSelectionForLoadedPapers;
|
||||||
|
|
||||||
///A Boolean value that determines whether the print panel includes a control for manipulating the paper size of the printer.
|
///A Boolean value that determines whether the print panel includes a control for manipulating the paper size of the printer.
|
||||||
///The default value is `true`.
|
///The default value is `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
bool? showsPaperSize;
|
bool? showsPaperSize;
|
||||||
|
|
||||||
///A Boolean value that determines whether the Print panel displays a built-in preview of the document contents.
|
///A Boolean value that determines whether the Print panel displays a built-in preview of the document contents.
|
||||||
///The default value is `true`.
|
///The default value is `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
bool? showsPreview;
|
bool? showsPreview;
|
||||||
|
|
||||||
@ -315,14 +315,14 @@ class PrintJobSettings {
|
|||||||
///that operation is controlled by the [showsProgressPanel] property.
|
///that operation is controlled by the [showsProgressPanel] property.
|
||||||
///Operations that generate EPS or PDF data do no display a progress panel, regardless of the value in the flag parameter.
|
///Operations that generate EPS or PDF data do no display a progress panel, regardless of the value in the flag parameter.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
bool? showsPrintPanel;
|
bool? showsPrintPanel;
|
||||||
|
|
||||||
///A Boolean value that determines whether the Print panel includes an additional selection option for paper range.
|
///A Boolean value that determines whether the Print panel includes an additional selection option for paper range.
|
||||||
///The default value is `true`.
|
///The default value is `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
bool? showsPrintSelection;
|
bool? showsPrintSelection;
|
||||||
|
|
||||||
@ -333,26 +333,26 @@ class PrintJobSettings {
|
|||||||
///that operation is controlled by the [showsPrintPanel] property.
|
///that operation is controlled by the [showsPrintPanel] property.
|
||||||
///Operations that generate EPS or PDF data do no display a progress panel, regardless of the value in the flag parameter.
|
///Operations that generate EPS or PDF data do no display a progress panel, regardless of the value in the flag parameter.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
bool? showsProgressPanel;
|
bool? showsProgressPanel;
|
||||||
|
|
||||||
///A Boolean value that determines whether the Print panel includes a control for scaling the printed output.
|
///A Boolean value that determines whether the Print panel includes a control for scaling the printed output.
|
||||||
///The default value is `true`.
|
///The default value is `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
bool? showsScaling;
|
bool? showsScaling;
|
||||||
|
|
||||||
///A timestamp that specifies the time at which printing should begin.
|
///A timestamp that specifies the time at which printing should begin.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
int? time;
|
int? time;
|
||||||
|
|
||||||
///The vertical pagination to the specified mode.
|
///The vertical pagination to the specified mode.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- MacOS
|
///- MacOS
|
||||||
PrintJobPaginationMode? verticalPagination;
|
PrintJobPaginationMode? verticalPagination;
|
||||||
PrintJobSettings(
|
PrintJobSettings(
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
import 'dart:ui';
|
import 'dart:ui';
|
||||||
|
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter_inappwebview_platform_interface/src/types/disposable.dart';
|
|
||||||
import 'package:plugin_platform_interface/plugin_platform_interface.dart';
|
import 'package:plugin_platform_interface/plugin_platform_interface.dart';
|
||||||
import '../in_app_webview/in_app_webview_settings.dart';
|
import '../in_app_webview/in_app_webview_settings.dart';
|
||||||
import '../debug_logging_settings.dart';
|
import '../debug_logging_settings.dart';
|
||||||
import '../inappwebview_platform.dart';
|
import '../inappwebview_platform.dart';
|
||||||
import '../types/main.dart';
|
import '../types/main.dart';
|
||||||
import 'pull_to_refresh_settings.dart';
|
import 'pull_to_refresh_settings.dart';
|
||||||
|
import '../in_app_webview/platform_webview.dart';
|
||||||
|
import '../in_app_browser/platform_in_app_browser.dart';
|
||||||
|
|
||||||
/// Object specifying creation parameters for creating a [PlatformPullToRefreshController].
|
/// Object specifying creation parameters for creating a [PlatformPullToRefreshController].
|
||||||
///
|
///
|
||||||
@ -22,25 +23,30 @@ class PlatformPullToRefreshControllerCreationParams {
|
|||||||
: this.options = options ?? PullToRefreshOptions(),
|
: this.options = options ?? PullToRefreshOptions(),
|
||||||
this.settings = settings ?? PullToRefreshSettings();
|
this.settings = settings ?? PullToRefreshSettings();
|
||||||
|
|
||||||
|
///{@macro flutter_inappwebview_platform_interface.PlatformPullToRefreshController.options}
|
||||||
@Deprecated("Use settings instead")
|
@Deprecated("Use settings instead")
|
||||||
late PullToRefreshOptions options;
|
late PullToRefreshOptions options;
|
||||||
|
|
||||||
|
///{@macro flutter_inappwebview_platform_interface.PlatformPullToRefreshController.settings}
|
||||||
late PullToRefreshSettings settings;
|
late PullToRefreshSettings settings;
|
||||||
|
|
||||||
///{@macro flutter_inappwebview_platform_interface.PlatformPullToRefreshController.onRefresh}
|
///{@macro flutter_inappwebview_platform_interface.PlatformPullToRefreshController.onRefresh}
|
||||||
final void Function()? onRefresh;
|
final void Function()? onRefresh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformPullToRefreshController}
|
||||||
///A standard controller that can initiate the refreshing of a scroll view’s contents.
|
///A standard controller that can initiate the refreshing of a scroll view’s contents.
|
||||||
///This should be used whenever the user can refresh the contents of a WebView via a vertical swipe gesture.
|
///This should be used whenever the user can refresh the contents of a WebView via a vertical swipe gesture.
|
||||||
///
|
///
|
||||||
///All the methods should be called only when the WebView has been created or is already running
|
///All the methods should be called only when the WebView has been created or is already running
|
||||||
///(for example [WebView.onWebViewCreated] or [InAppBrowser.onBrowserCreated]).
|
///(for example [PlatformWebViewCreationParams.onWebViewCreated] or [PlatformInAppBrowserEvents.onBrowserCreated]).
|
||||||
///
|
///
|
||||||
///**NOTE for Android**: to be able to use the "pull-to-refresh" feature, [InAppWebViewSettings.useHybridComposition] must be `true`.
|
///**NOTE for Android**: to be able to use the "pull-to-refresh" feature, [InAppWebViewSettings.useHybridComposition] must be `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
|
///{@endtemplate}
|
||||||
abstract class PlatformPullToRefreshController extends PlatformInterface
|
abstract class PlatformPullToRefreshController extends PlatformInterface
|
||||||
implements Disposable {
|
implements Disposable {
|
||||||
///Debug settings.
|
///Debug settings.
|
||||||
@ -76,8 +82,15 @@ abstract class PlatformPullToRefreshController extends PlatformInterface
|
|||||||
/// The parameters used to initialize the [PlatformPullToRefreshController].
|
/// The parameters used to initialize the [PlatformPullToRefreshController].
|
||||||
final PlatformPullToRefreshControllerCreationParams params;
|
final PlatformPullToRefreshControllerCreationParams params;
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformPullToRefreshController.options}
|
||||||
|
/// Use [settings] instead.
|
||||||
|
///{@endtemplate}
|
||||||
@Deprecated("Use settings instead")
|
@Deprecated("Use settings instead")
|
||||||
PullToRefreshOptions get options => params.options;
|
PullToRefreshOptions get options => params.options;
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformPullToRefreshController.settings}
|
||||||
|
/// Initial settings.
|
||||||
|
///{@endtemplate}
|
||||||
PullToRefreshSettings get settings => params.settings;
|
PullToRefreshSettings get settings => params.settings;
|
||||||
|
|
||||||
///{@template flutter_inappwebview_platform_interface.PlatformPullToRefreshController.onRefresh}
|
///{@template flutter_inappwebview_platform_interface.PlatformPullToRefreshController.onRefresh}
|
||||||
@ -85,40 +98,47 @@ abstract class PlatformPullToRefreshController extends PlatformInterface
|
|||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
void Function()? get onRefresh => params.onRefresh;
|
void Function()? get onRefresh => params.onRefresh;
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformPullToRefreshController.setEnabled}
|
||||||
///Sets whether the pull-to-refresh feature is enabled or not.
|
///Sets whether the pull-to-refresh feature is enabled or not.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - SwipeRefreshLayout.setEnabled](https://developer.android.com/reference/androidx/swiperefreshlayout/widget/SwipeRefreshLayout#setEnabled(boolean)))
|
///- Android native WebView ([Official API - SwipeRefreshLayout.setEnabled](https://developer.android.com/reference/androidx/swiperefreshlayout/widget/SwipeRefreshLayout#setEnabled(boolean)))
|
||||||
///- iOS ([Official API - UIScrollView.refreshControl](https://developer.apple.com/documentation/uikit/uiscrollview/2127691-refreshcontrol))
|
///- iOS ([Official API - UIScrollView.refreshControl](https://developer.apple.com/documentation/uikit/uiscrollview/2127691-refreshcontrol))
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> setEnabled(bool enabled) {
|
Future<void> setEnabled(bool enabled) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'setEnabled is not implemented on the current platform');
|
'setEnabled is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformPullToRefreshController.isEnabled}
|
||||||
///Returns `true` is pull-to-refresh feature is enabled, otherwise `false`.
|
///Returns `true` is pull-to-refresh feature is enabled, otherwise `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - View.isEnabled](https://developer.android.com/reference/android/view/View#isEnabled()))
|
///- Android native WebView ([Official API - View.isEnabled](https://developer.android.com/reference/android/view/View#isEnabled()))
|
||||||
///- iOS ([Official API - UIScrollView.refreshControl](https://developer.apple.com/documentation/uikit/uiscrollview/2127691-refreshcontrol))
|
///- iOS ([Official API - UIScrollView.refreshControl](https://developer.apple.com/documentation/uikit/uiscrollview/2127691-refreshcontrol))
|
||||||
|
///{@endtemplate}
|
||||||
Future<bool> isEnabled() {
|
Future<bool> isEnabled() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'isEnabled is not implemented on the current platform');
|
'isEnabled is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformPullToRefreshController.beginRefreshing}
|
||||||
///Tells the controller that a refresh operation was started programmatically.
|
///Tells the controller that a refresh operation was started programmatically.
|
||||||
///
|
///
|
||||||
///Call this method when an external event source triggers a programmatic refresh of your scrolling view.
|
///Call this method when an external event source triggers a programmatic refresh of your scrolling view.
|
||||||
///This method updates the state of the refresh control to reflect the in-progress refresh operation.
|
///This method updates the state of the refresh control to reflect the in-progress refresh operation.
|
||||||
///When the refresh operation ends, be sure to call the [endRefreshing] method to return the controller to its default state.
|
///When the refresh operation ends, be sure to call the [endRefreshing] method to return the controller to its default state.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> beginRefreshing() {
|
Future<void> beginRefreshing() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'beginRefreshing is not implemented on the current platform');
|
'beginRefreshing is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformPullToRefreshController.endRefreshing}
|
||||||
///Tells the controller that a refresh operation has ended.
|
///Tells the controller that a refresh operation has ended.
|
||||||
///
|
///
|
||||||
///Call this method at the end of any refresh operation (whether it was initiated programmatically or by the user)
|
///Call this method at the end of any refresh operation (whether it was initiated programmatically or by the user)
|
||||||
@ -126,103 +146,127 @@ abstract class PlatformPullToRefreshController extends PlatformInterface
|
|||||||
///If the refresh control is at least partially visible, calling this method also hides it.
|
///If the refresh control is at least partially visible, calling this method also hides it.
|
||||||
///If animations are also enabled, the control is hidden using an animation.
|
///If animations are also enabled, the control is hidden using an animation.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> endRefreshing() {
|
Future<void> endRefreshing() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'endRefreshing is not implemented on the current platform');
|
'endRefreshing is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformPullToRefreshController.isRefreshing}
|
||||||
///Returns whether a refresh operation has been triggered and is in progress.
|
///Returns whether a refresh operation has been triggered and is in progress.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - SwipeRefreshLayout.isRefreshing](https://developer.android.com/reference/androidx/swiperefreshlayout/widget/SwipeRefreshLayout#isRefreshing()))
|
///- Android native WebView ([Official API - SwipeRefreshLayout.isRefreshing](https://developer.android.com/reference/androidx/swiperefreshlayout/widget/SwipeRefreshLayout#isRefreshing()))
|
||||||
///- iOS ([Official API - UIRefreshControl.isRefreshing](https://developer.apple.com/documentation/uikit/uirefreshcontrol/1624844-isrefreshing))
|
///- iOS ([Official API - UIRefreshControl.isRefreshing](https://developer.apple.com/documentation/uikit/uirefreshcontrol/1624844-isrefreshing))
|
||||||
|
///{@endtemplate}
|
||||||
Future<bool> isRefreshing() {
|
Future<bool> isRefreshing() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'isRefreshing is not implemented on the current platform');
|
'isRefreshing is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformPullToRefreshController.setColor}
|
||||||
///Sets the color of the refresh control.
|
///Sets the color of the refresh control.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - SwipeRefreshLayout.setColorSchemeColors](https://developer.android.com/reference/androidx/swiperefreshlayout/widget/SwipeRefreshLayout#setColorSchemeColors(int...)))
|
///- Android native WebView ([Official API - SwipeRefreshLayout.setColorSchemeColors](https://developer.android.com/reference/androidx/swiperefreshlayout/widget/SwipeRefreshLayout#setColorSchemeColors(int...)))
|
||||||
///- iOS ([Official API - UIRefreshControl.tintColor](https://developer.apple.com/documentation/uikit/uirefreshcontrol/1624847-tintcolor))
|
///- iOS ([Official API - UIRefreshControl.tintColor](https://developer.apple.com/documentation/uikit/uirefreshcontrol/1624847-tintcolor))
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> setColor(Color color) {
|
Future<void> setColor(Color color) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'setColor is not implemented on the current platform');
|
'setColor is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformPullToRefreshController.setBackgroundColor}
|
||||||
///Sets the background color of the refresh control.
|
///Sets the background color of the refresh control.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - SwipeRefreshLayout.setProgressBackgroundColorSchemeColor](https://developer.android.com/reference/androidx/swiperefreshlayout/widget/SwipeRefreshLayout#setProgressBackgroundColorSchemeColor(int)))
|
///- Android native WebView ([Official API - SwipeRefreshLayout.setProgressBackgroundColorSchemeColor](https://developer.android.com/reference/androidx/swiperefreshlayout/widget/SwipeRefreshLayout#setProgressBackgroundColorSchemeColor(int)))
|
||||||
///- iOS ([Official API - UIView.backgroundColor](https://developer.apple.com/documentation/uikit/uiview/1622591-backgroundcolor))
|
///- iOS ([Official API - UIView.backgroundColor](https://developer.apple.com/documentation/uikit/uiview/1622591-backgroundcolor))
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> setBackgroundColor(Color color) {
|
Future<void> setBackgroundColor(Color color) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'setBackgroundColor is not implemented on the current platform');
|
'setBackgroundColor is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformPullToRefreshController.setDistanceToTriggerSync}
|
||||||
///Set the distance to trigger a sync in dips.
|
///Set the distance to trigger a sync in dips.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - SwipeRefreshLayout.setDistanceToTriggerSync](https://developer.android.com/reference/androidx/swiperefreshlayout/widget/SwipeRefreshLayout#setDistanceToTriggerSync(int)))
|
///- Android native WebView ([Official API - SwipeRefreshLayout.setDistanceToTriggerSync](https://developer.android.com/reference/androidx/swiperefreshlayout/widget/SwipeRefreshLayout#setDistanceToTriggerSync(int)))
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> setDistanceToTriggerSync(int distanceToTriggerSync) {
|
Future<void> setDistanceToTriggerSync(int distanceToTriggerSync) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'setDistanceToTriggerSync is not implemented on the current platform');
|
'setDistanceToTriggerSync is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformPullToRefreshController.setSlingshotDistance}
|
||||||
///Sets the distance that the refresh indicator can be pulled beyond its resting position during a swipe gesture.
|
///Sets the distance that the refresh indicator can be pulled beyond its resting position during a swipe gesture.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - SwipeRefreshLayout.setSlingshotDistance](https://developer.android.com/reference/androidx/swiperefreshlayout/widget/SwipeRefreshLayout#setSlingshotDistance(int)))
|
///- Android native WebView ([Official API - SwipeRefreshLayout.setSlingshotDistance](https://developer.android.com/reference/androidx/swiperefreshlayout/widget/SwipeRefreshLayout#setSlingshotDistance(int)))
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> setSlingshotDistance(int slingshotDistance) {
|
Future<void> setSlingshotDistance(int slingshotDistance) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'setSlingshotDistance is not implemented on the current platform');
|
'setSlingshotDistance is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformPullToRefreshController.getDefaultSlingshotDistance}
|
||||||
///Gets the default distance that the refresh indicator can be pulled beyond its resting position during a swipe gesture.
|
///Gets the default distance that the refresh indicator can be pulled beyond its resting position during a swipe gesture.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - SwipeRefreshLayout.DEFAULT_SLINGSHOT_DISTANCE](https://developer.android.com/reference/androidx/swiperefreshlayout/widget/SwipeRefreshLayout#DEFAULT_SLINGSHOT_DISTANCE()))
|
///- Android native WebView ([Official API - SwipeRefreshLayout.DEFAULT_SLINGSHOT_DISTANCE](https://developer.android.com/reference/androidx/swiperefreshlayout/widget/SwipeRefreshLayout#DEFAULT_SLINGSHOT_DISTANCE()))
|
||||||
|
///{@endtemplate}
|
||||||
Future<int> getDefaultSlingshotDistance() {
|
Future<int> getDefaultSlingshotDistance() {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'getDefaultSlingshotDistance is not implemented on the current platform');
|
'getDefaultSlingshotDistance is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformPullToRefreshController.setSize}
|
||||||
///Use [setIndicatorSize] instead.
|
///Use [setIndicatorSize] instead.
|
||||||
|
///{@endtemplate}
|
||||||
@Deprecated("Use setIndicatorSize instead")
|
@Deprecated("Use setIndicatorSize instead")
|
||||||
Future<void> setSize(AndroidPullToRefreshSize size) {
|
Future<void> setSize(AndroidPullToRefreshSize size) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'setSize is not implemented on the current platform');
|
'setSize is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformPullToRefreshController.setIndicatorSize}
|
||||||
///Sets the size of the refresh indicator. One of [PullToRefreshSize.DEFAULT], or [PullToRefreshSize.LARGE].
|
///Sets the size of the refresh indicator. One of [PullToRefreshSize.DEFAULT], or [PullToRefreshSize.LARGE].
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - SwipeRefreshLayout.setSize](https://developer.android.com/reference/androidx/swiperefreshlayout/widget/SwipeRefreshLayout#setSize(int)))
|
///- Android native WebView ([Official API - SwipeRefreshLayout.setSize](https://developer.android.com/reference/androidx/swiperefreshlayout/widget/SwipeRefreshLayout#setSize(int)))
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> setIndicatorSize(PullToRefreshSize size) {
|
Future<void> setIndicatorSize(PullToRefreshSize size) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'setIndicatorSize is not implemented on the current platform');
|
'setIndicatorSize is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformPullToRefreshController.setAttributedTitle}
|
||||||
///Use [setStyledTitle] instead.
|
///Use [setStyledTitle] instead.
|
||||||
|
///{@endtemplate}
|
||||||
@Deprecated("Use setStyledTitle instead")
|
@Deprecated("Use setStyledTitle instead")
|
||||||
Future<void> setAttributedTitle(IOSNSAttributedString attributedTitle) {
|
Future<void> setAttributedTitle(IOSNSAttributedString attributedTitle) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'setAttributedTitle is not implemented on the current platform');
|
'setAttributedTitle is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformPullToRefreshController.setStyledTitle}
|
||||||
///Sets the styled title text to display in the refresh control.
|
///Sets the styled title text to display in the refresh control.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - UIRefreshControl.attributedTitle](https://developer.apple.com/documentation/uikit/uirefreshcontrol/1624845-attributedtitle))
|
///- iOS ([Official API - UIRefreshControl.attributedTitle](https://developer.apple.com/documentation/uikit/uirefreshcontrol/1624845-attributedtitle))
|
||||||
|
///{@endtemplate}
|
||||||
Future<void> setStyledTitle(AttributedString attributedTitle) {
|
Future<void> setStyledTitle(AttributedString attributedTitle) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
'setStyledTitle is not implemented on the current platform');
|
'setStyledTitle is not implemented on the current platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///{@template flutter_inappwebview_platform_interface.PlatformPullToRefreshController.dispose}
|
||||||
|
///Disposes the controller.
|
||||||
|
///{@endtemplate}
|
||||||
@override
|
@override
|
||||||
void dispose({bool isKeepAlive = false}) {
|
void dispose({bool isKeepAlive = false}) {
|
||||||
throw UnimplementedError(
|
throw UnimplementedError(
|
||||||
|
@ -14,46 +14,46 @@ class PullToRefreshSettings_ {
|
|||||||
///Sets whether the pull-to-refresh feature is enabled or not.
|
///Sets whether the pull-to-refresh feature is enabled or not.
|
||||||
///The default value is `true`.
|
///The default value is `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
bool? enabled;
|
bool? enabled;
|
||||||
|
|
||||||
///The color of the refresh control.
|
///The color of the refresh control.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
Color_? color;
|
Color_? color;
|
||||||
|
|
||||||
///The background color of the refresh control.
|
///The background color of the refresh control.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
Color_? backgroundColor;
|
Color_? backgroundColor;
|
||||||
|
|
||||||
///The distance to trigger a sync in dips.
|
///The distance to trigger a sync in dips.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
int? distanceToTriggerSync;
|
int? distanceToTriggerSync;
|
||||||
|
|
||||||
///The distance in pixels that the refresh indicator can be pulled beyond its resting position.
|
///The distance in pixels that the refresh indicator can be pulled beyond its resting position.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
int? slingshotDistance;
|
int? slingshotDistance;
|
||||||
|
|
||||||
///The size of the refresh indicator.
|
///The size of the refresh indicator.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
PullToRefreshSize_? size;
|
PullToRefreshSize_? size;
|
||||||
|
|
||||||
///The title text to display in the refresh control.
|
///The title text to display in the refresh control.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
AttributedString_? attributedTitle;
|
AttributedString_? attributedTitle;
|
||||||
|
|
||||||
|
@ -10,47 +10,47 @@ part of 'pull_to_refresh_settings.dart';
|
|||||||
class PullToRefreshSettings {
|
class PullToRefreshSettings {
|
||||||
///The title text to display in the refresh control.
|
///The title text to display in the refresh control.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
AttributedString? attributedTitle;
|
AttributedString? attributedTitle;
|
||||||
|
|
||||||
///The background color of the refresh control.
|
///The background color of the refresh control.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
Color? backgroundColor;
|
Color? backgroundColor;
|
||||||
|
|
||||||
///The color of the refresh control.
|
///The color of the refresh control.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
Color? color;
|
Color? color;
|
||||||
|
|
||||||
///The distance to trigger a sync in dips.
|
///The distance to trigger a sync in dips.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
int? distanceToTriggerSync;
|
int? distanceToTriggerSync;
|
||||||
|
|
||||||
///Sets whether the pull-to-refresh feature is enabled or not.
|
///Sets whether the pull-to-refresh feature is enabled or not.
|
||||||
///The default value is `true`.
|
///The default value is `true`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
bool? enabled;
|
bool? enabled;
|
||||||
|
|
||||||
///The size of the refresh indicator.
|
///The size of the refresh indicator.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
PullToRefreshSize? size;
|
PullToRefreshSize? size;
|
||||||
|
|
||||||
///The distance in pixels that the refresh indicator can be pulled beyond its resting position.
|
///The distance in pixels that the refresh indicator can be pulled beyond its resting position.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
int? slingshotDistance;
|
int? slingshotDistance;
|
||||||
PullToRefreshSettings(
|
PullToRefreshSettings(
|
||||||
|
@ -10,7 +10,7 @@ part 'activity_button.g.dart';
|
|||||||
///
|
///
|
||||||
///Check [Official Apple App Extensions](https://developer.apple.com/app-extensions/) for more details.
|
///Check [Official Apple App Extensions](https://developer.apple.com/app-extensions/) for more details.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
@ExchangeableObject()
|
@ExchangeableObject()
|
||||||
class ActivityButton_ {
|
class ActivityButton_ {
|
||||||
|
@ -12,7 +12,7 @@ part of 'activity_button.dart';
|
|||||||
///
|
///
|
||||||
///Check [Official Apple App Extensions](https://developer.apple.com/app-extensions/) for more details.
|
///Check [Official Apple App Extensions](https://developer.apple.com/app-extensions/) for more details.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
class ActivityButton {
|
class ActivityButton {
|
||||||
///The name of the App or Share Extension to be called.
|
///The name of the App or Share Extension to be called.
|
||||||
|
@ -2,10 +2,11 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_i
|
|||||||
|
|
||||||
import 'url_authentication_challenge.dart';
|
import 'url_authentication_challenge.dart';
|
||||||
import 'url_protection_space.dart';
|
import 'url_protection_space.dart';
|
||||||
|
import '../in_app_webview/platform_webview.dart';
|
||||||
|
|
||||||
part 'client_cert_challenge.g.dart';
|
part 'client_cert_challenge.g.dart';
|
||||||
|
|
||||||
///Class that represents the challenge of the [WebView.onReceivedClientCertRequest] event.
|
///Class that represents the challenge of the [PlatformWebViewCreationParams.onReceivedClientCertRequest] event.
|
||||||
///It provides all the information about the challenge.
|
///It provides all the information about the challenge.
|
||||||
@ExchangeableObject()
|
@ExchangeableObject()
|
||||||
class ClientCertChallenge_ extends URLAuthenticationChallenge_ {
|
class ClientCertChallenge_ extends URLAuthenticationChallenge_ {
|
||||||
|
@ -6,7 +6,7 @@ part of 'client_cert_challenge.dart';
|
|||||||
// ExchangeableObjectGenerator
|
// ExchangeableObjectGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
///Class that represents the challenge of the [WebView.onReceivedClientCertRequest] event.
|
///Class that represents the challenge of the [PlatformWebViewCreationParams.onReceivedClientCertRequest] event.
|
||||||
///It provides all the information about the challenge.
|
///It provides all the information about the challenge.
|
||||||
class ClientCertChallenge extends URLAuthenticationChallenge {
|
class ClientCertChallenge extends URLAuthenticationChallenge {
|
||||||
///Use [keyTypes] instead.
|
///Use [keyTypes] instead.
|
||||||
@ -19,13 +19,13 @@ class ClientCertChallenge extends URLAuthenticationChallenge {
|
|||||||
|
|
||||||
///Returns the acceptable types of asymmetric keys.
|
///Returns the acceptable types of asymmetric keys.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView 21+ ([Official API - ClientCertRequest.getKeyTypes](https://developer.android.com/reference/android/webkit/ClientCertRequest#getKeyTypes()))
|
///- Android native WebView 21+ ([Official API - ClientCertRequest.getKeyTypes](https://developer.android.com/reference/android/webkit/ClientCertRequest#getKeyTypes()))
|
||||||
List<String>? keyTypes;
|
List<String>? keyTypes;
|
||||||
|
|
||||||
///The acceptable certificate issuers for the certificate matching the private key.
|
///The acceptable certificate issuers for the certificate matching the private key.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView 21+ ([Official API - ClientCertRequest.getPrincipals](https://developer.android.com/reference/android/webkit/ClientCertRequest#getPrincipals()))
|
///- Android native WebView 21+ ([Official API - ClientCertRequest.getPrincipals](https://developer.android.com/reference/android/webkit/ClientCertRequest#getPrincipals()))
|
||||||
List<String>? principals;
|
List<String>? principals;
|
||||||
ClientCertChallenge(
|
ClientCertChallenge(
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import 'package:flutter/foundation.dart';
|
import '../in_app_webview/platform_webview.dart';
|
||||||
import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart';
|
import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart';
|
||||||
|
|
||||||
import '../util.dart';
|
import '../util.dart';
|
||||||
@ -6,7 +6,7 @@ import 'client_cert_response_action.dart';
|
|||||||
|
|
||||||
part 'client_cert_response.g.dart';
|
part 'client_cert_response.g.dart';
|
||||||
|
|
||||||
///Class that represents the response used by the [WebView.onReceivedClientCertRequest] event.
|
///Class that represents the response used by the [PlatformWebViewCreationParams.onReceivedClientCertRequest] event.
|
||||||
@ExchangeableObject()
|
@ExchangeableObject()
|
||||||
class ClientCertResponse_ {
|
class ClientCertResponse_ {
|
||||||
///The file path of the certificate to use.
|
///The file path of the certificate to use.
|
||||||
|
@ -6,7 +6,7 @@ part of 'client_cert_response.dart';
|
|||||||
// ExchangeableObjectGenerator
|
// ExchangeableObjectGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
///Class that represents the response used by the [WebView.onReceivedClientCertRequest] event.
|
///Class that represents the response used by the [PlatformWebViewCreationParams.onReceivedClientCertRequest] event.
|
||||||
class ClientCertResponse {
|
class ClientCertResponse {
|
||||||
///Indicate the [ClientCertResponseAction] to take in response of the client certificate challenge.
|
///Indicate the [ClientCertResponseAction] to take in response of the client certificate challenge.
|
||||||
ClientCertResponseAction? action;
|
ClientCertResponseAction? action;
|
||||||
@ -23,7 +23,7 @@ class ClientCertResponse {
|
|||||||
|
|
||||||
///An Android-specific property used by Java [KeyStore](https://developer.android.com/reference/java/security/KeyStore) class to get the instance.
|
///An Android-specific property used by Java [KeyStore](https://developer.android.com/reference/java/security/KeyStore) class to get the instance.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
String? keyStoreType;
|
String? keyStoreType;
|
||||||
ClientCertResponse(
|
ClientCertResponse(
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart';
|
import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart';
|
||||||
|
|
||||||
|
import '../in_app_webview/platform_webview.dart';
|
||||||
import 'console_message_level.dart';
|
import 'console_message_level.dart';
|
||||||
|
|
||||||
part 'console_message.g.dart';
|
part 'console_message.g.dart';
|
||||||
@ -7,7 +8,7 @@ part 'console_message.g.dart';
|
|||||||
///Class representing a JavaScript console message from WebCore.
|
///Class representing a JavaScript console message from WebCore.
|
||||||
///This could be a issued by a call to one of the console logging functions (e.g. console.log('...')) or a JavaScript error on the page.
|
///This could be a issued by a call to one of the console logging functions (e.g. console.log('...')) or a JavaScript error on the page.
|
||||||
///
|
///
|
||||||
///To receive notifications of these messages, use the [WebView.onConsoleMessage] event.
|
///To receive notifications of these messages, use the [PlatformWebViewCreationParams.onConsoleMessage] event.
|
||||||
@ExchangeableObject()
|
@ExchangeableObject()
|
||||||
class ConsoleMessage_ {
|
class ConsoleMessage_ {
|
||||||
///Console message
|
///Console message
|
||||||
|
@ -9,7 +9,7 @@ part of 'console_message.dart';
|
|||||||
///Class representing a JavaScript console message from WebCore.
|
///Class representing a JavaScript console message from WebCore.
|
||||||
///This could be a issued by a call to one of the console logging functions (e.g. console.log('...')) or a JavaScript error on the page.
|
///This could be a issued by a call to one of the console logging functions (e.g. console.log('...')) or a JavaScript error on the page.
|
||||||
///
|
///
|
||||||
///To receive notifications of these messages, use the [WebView.onConsoleMessage] event.
|
///To receive notifications of these messages, use the [PlatformWebViewCreationParams.onConsoleMessage] event.
|
||||||
class ConsoleMessage {
|
class ConsoleMessage {
|
||||||
///Console message
|
///Console message
|
||||||
String message;
|
String message;
|
||||||
|
@ -18,7 +18,7 @@ class ContentBlockerActionType {
|
|||||||
|
|
||||||
///Stops loading of the resource. If the resource was cached, the cache is ignored.
|
///Stops loading of the resource. If the resource was cached, the cache is ignored.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -41,7 +41,7 @@ class ContentBlockerActionType {
|
|||||||
///This only blocks cookies otherwise acceptable to WebView's privacy policy.
|
///This only blocks cookies otherwise acceptable to WebView's privacy policy.
|
||||||
///Combining with [IGNORE_PREVIOUS_RULES] doesn't override the browser’s privacy settings.
|
///Combining with [IGNORE_PREVIOUS_RULES] doesn't override the browser’s privacy settings.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
static final BLOCK_COOKIES =
|
static final BLOCK_COOKIES =
|
||||||
@ -63,7 +63,7 @@ class ContentBlockerActionType {
|
|||||||
///
|
///
|
||||||
///**NOTE**: on Android, JavaScript must be enabled.
|
///**NOTE**: on Android, JavaScript must be enabled.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
@ -84,7 +84,7 @@ class ContentBlockerActionType {
|
|||||||
|
|
||||||
///Ignores previously triggered actions.
|
///Ignores previously triggered actions.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
static final IGNORE_PREVIOUS_RULES =
|
static final IGNORE_PREVIOUS_RULES =
|
||||||
@ -104,7 +104,7 @@ class ContentBlockerActionType {
|
|||||||
///Changes a URL from http to https.
|
///Changes a URL from http to https.
|
||||||
///URLs with a specified (nondefault) port and links using other protocols are unaffected.
|
///URLs with a specified (nondefault) port and links using other protocols are unaffected.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
|
@ -12,7 +12,7 @@ class Cookie {
|
|||||||
///
|
///
|
||||||
///**NOTE for Android native WebView**: available on Android only if [WebViewFeature.GET_COOKIE_INFO] feature is supported.
|
///**NOTE for Android native WebView**: available on Android only if [WebViewFeature.GET_COOKIE_INFO] feature is supported.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
@ -22,7 +22,7 @@ class Cookie {
|
|||||||
///
|
///
|
||||||
///**NOTE for Android native WebView**: available on Android only if [WebViewFeature.GET_COOKIE_INFO] feature is supported.
|
///**NOTE for Android native WebView**: available on Android only if [WebViewFeature.GET_COOKIE_INFO] feature is supported.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
@ -32,7 +32,7 @@ class Cookie {
|
|||||||
///
|
///
|
||||||
///**NOTE for Android native WebView**: available on Android only if [WebViewFeature.GET_COOKIE_INFO] feature is supported.
|
///**NOTE for Android native WebView**: available on Android only if [WebViewFeature.GET_COOKIE_INFO] feature is supported.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
@ -42,7 +42,7 @@ class Cookie {
|
|||||||
///
|
///
|
||||||
///**NOTE for Android native WebView**: available on Android only if [WebViewFeature.GET_COOKIE_INFO] feature is supported.
|
///**NOTE for Android native WebView**: available on Android only if [WebViewFeature.GET_COOKIE_INFO] feature is supported.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
@ -50,14 +50,14 @@ class Cookie {
|
|||||||
|
|
||||||
///Indicates if the cookie is a session only cookie.
|
///Indicates if the cookie is a session only cookie.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
bool? isSessionOnly;
|
bool? isSessionOnly;
|
||||||
|
|
||||||
///The cookie name.
|
///The cookie name.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
@ -68,7 +68,7 @@ class Cookie {
|
|||||||
///
|
///
|
||||||
///**NOTE for Android native WebView**: available on Android only if [WebViewFeature.GET_COOKIE_INFO] feature is supported.
|
///**NOTE for Android native WebView**: available on Android only if [WebViewFeature.GET_COOKIE_INFO] feature is supported.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
@ -78,7 +78,7 @@ class Cookie {
|
|||||||
///
|
///
|
||||||
///**NOTE for Android native WebView**: available on Android only if [WebViewFeature.GET_COOKIE_INFO] feature is supported.
|
///**NOTE for Android native WebView**: available on Android only if [WebViewFeature.GET_COOKIE_INFO] feature is supported.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
@ -86,7 +86,7 @@ class Cookie {
|
|||||||
|
|
||||||
///The cookie value.
|
///The cookie value.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
|
@ -5,10 +5,11 @@ import 'window_features.dart';
|
|||||||
import 'url_request.dart';
|
import 'url_request.dart';
|
||||||
import 'frame_info.dart';
|
import 'frame_info.dart';
|
||||||
import 'navigation_type.dart';
|
import 'navigation_type.dart';
|
||||||
|
import '../in_app_webview/platform_webview.dart';
|
||||||
|
|
||||||
part 'create_window_action.g.dart';
|
part 'create_window_action.g.dart';
|
||||||
|
|
||||||
///Class that represents the navigation request used by the [WebView.onCreateWindow] event.
|
///Class that represents the navigation request used by the [PlatformWebViewCreationParams.onCreateWindow] event.
|
||||||
@ExchangeableObject()
|
@ExchangeableObject()
|
||||||
class CreateWindowAction_ extends NavigationAction_ {
|
class CreateWindowAction_ extends NavigationAction_ {
|
||||||
///The window id. Used by `WebView` to create a new WebView.
|
///The window id. Used by `WebView` to create a new WebView.
|
||||||
|
@ -6,7 +6,7 @@ part of 'create_window_action.dart';
|
|||||||
// ExchangeableObjectGenerator
|
// ExchangeableObjectGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
///Class that represents the navigation request used by the [WebView.onCreateWindow] event.
|
///Class that represents the navigation request used by the [PlatformWebViewCreationParams.onCreateWindow] event.
|
||||||
class CreateWindowAction extends NavigationAction {
|
class CreateWindowAction extends NavigationAction {
|
||||||
///Use [isDialog] instead.
|
///Use [isDialog] instead.
|
||||||
@Deprecated('Use isDialog instead')
|
@Deprecated('Use isDialog instead')
|
||||||
@ -18,13 +18,13 @@ class CreateWindowAction extends NavigationAction {
|
|||||||
|
|
||||||
///Indicates if the new window should be a dialog, rather than a full-size window.
|
///Indicates if the new window should be a dialog, rather than a full-size window.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
bool? isDialog;
|
bool? isDialog;
|
||||||
|
|
||||||
///Window features requested by the webpage.
|
///Window features requested by the webpage.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - WKWindowFeatures](https://developer.apple.com/documentation/webkit/wkwindowfeatures))
|
///- iOS ([Official API - WKWindowFeatures](https://developer.apple.com/documentation/webkit/wkwindowfeatures))
|
||||||
///- MacOS ([Official API - WKWindowFeatures](https://developer.apple.com/documentation/webkit/wkwindowfeatures))
|
///- MacOS ([Official API - WKWindowFeatures](https://developer.apple.com/documentation/webkit/wkwindowfeatures))
|
||||||
WindowFeatures? windowFeatures;
|
WindowFeatures? windowFeatures;
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
import 'dart:typed_data';
|
import 'dart:typed_data';
|
||||||
|
|
||||||
import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart';
|
import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart';
|
||||||
|
import '../in_app_webview/platform_webview.dart';
|
||||||
|
|
||||||
part 'custom_scheme_response.g.dart';
|
part 'custom_scheme_response.g.dart';
|
||||||
|
|
||||||
///Class representing the response returned by the [WebView.onLoadResourceWithCustomScheme] event.
|
///Class representing the response returned by the [PlatformWebViewCreationParams.onLoadResourceWithCustomScheme] event.
|
||||||
///It allows to load a specific resource. The resource data must be encoded to `base64`.
|
///It allows to load a specific resource. The resource data must be encoded to `base64`.
|
||||||
@ExchangeableObject()
|
@ExchangeableObject()
|
||||||
class CustomSchemeResponse_ {
|
class CustomSchemeResponse_ {
|
||||||
|
@ -6,7 +6,7 @@ part of 'custom_scheme_response.dart';
|
|||||||
// ExchangeableObjectGenerator
|
// ExchangeableObjectGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
///Class representing the response returned by the [WebView.onLoadResourceWithCustomScheme] event.
|
///Class representing the response returned by the [PlatformWebViewCreationParams.onLoadResourceWithCustomScheme] event.
|
||||||
///It allows to load a specific resource. The resource data must be encoded to `base64`.
|
///It allows to load a specific resource. The resource data must be encoded to `base64`.
|
||||||
class CustomSchemeResponse {
|
class CustomSchemeResponse {
|
||||||
///Content-Encoding of the data, such as `utf-8`.
|
///Content-Encoding of the data, such as `utf-8`.
|
||||||
|
@ -4,7 +4,7 @@ import '../chrome_safari_browser/platform_chrome_safari_browser.dart';
|
|||||||
|
|
||||||
part 'custom_tabs_navigation_event_type.g.dart';
|
part 'custom_tabs_navigation_event_type.g.dart';
|
||||||
|
|
||||||
///The type corresponding to the navigation event of [PlatformChromeSafariBrowser.onNavigationEvent].
|
///The type corresponding to the navigation event of [PlatformChromeSafariBrowserEvents.onNavigationEvent].
|
||||||
@ExchangeableEnum()
|
@ExchangeableEnum()
|
||||||
class CustomTabsNavigationEventType_ {
|
class CustomTabsNavigationEventType_ {
|
||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
|
@ -18,7 +18,7 @@ class CustomTabsNavigationEventType {
|
|||||||
|
|
||||||
///Sent when loading was aborted by a user action before it finishes like clicking on a link or refreshing the page.
|
///Sent when loading was aborted by a user action before it finishes like clicking on a link or refreshing the page.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
static final ABORTED =
|
static final ABORTED =
|
||||||
CustomTabsNavigationEventType._internalMultiPlatform(4, () {
|
CustomTabsNavigationEventType._internalMultiPlatform(4, () {
|
||||||
@ -33,7 +33,7 @@ class CustomTabsNavigationEventType {
|
|||||||
|
|
||||||
///Sent when the tab couldn't finish loading due to a failure.
|
///Sent when the tab couldn't finish loading due to a failure.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
static final FAILED =
|
static final FAILED =
|
||||||
CustomTabsNavigationEventType._internalMultiPlatform(3, () {
|
CustomTabsNavigationEventType._internalMultiPlatform(3, () {
|
||||||
@ -48,7 +48,7 @@ class CustomTabsNavigationEventType {
|
|||||||
|
|
||||||
///Sent when the tab has finished loading a page.
|
///Sent when the tab has finished loading a page.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
static final FINISHED =
|
static final FINISHED =
|
||||||
CustomTabsNavigationEventType._internalMultiPlatform(2, () {
|
CustomTabsNavigationEventType._internalMultiPlatform(2, () {
|
||||||
@ -63,7 +63,7 @@ class CustomTabsNavigationEventType {
|
|||||||
|
|
||||||
///Sent when the tab has started loading a page.
|
///Sent when the tab has started loading a page.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
static final STARTED =
|
static final STARTED =
|
||||||
CustomTabsNavigationEventType._internalMultiPlatform(1, () {
|
CustomTabsNavigationEventType._internalMultiPlatform(1, () {
|
||||||
@ -78,7 +78,7 @@ class CustomTabsNavigationEventType {
|
|||||||
|
|
||||||
///Sent when the tab becomes hidden.
|
///Sent when the tab becomes hidden.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
static final TAB_HIDDEN =
|
static final TAB_HIDDEN =
|
||||||
CustomTabsNavigationEventType._internalMultiPlatform(6, () {
|
CustomTabsNavigationEventType._internalMultiPlatform(6, () {
|
||||||
@ -93,7 +93,7 @@ class CustomTabsNavigationEventType {
|
|||||||
|
|
||||||
///Sent when the tab becomes visible.
|
///Sent when the tab becomes visible.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
static final TAB_SHOWN =
|
static final TAB_SHOWN =
|
||||||
CustomTabsNavigationEventType._internalMultiPlatform(5, () {
|
CustomTabsNavigationEventType._internalMultiPlatform(5, () {
|
||||||
|
@ -20,7 +20,7 @@ class CustomTabsPostMessageResultType {
|
|||||||
///Indicates that the postMessage request was not allowed due to a bad argument
|
///Indicates that the postMessage request was not allowed due to a bad argument
|
||||||
///or requesting at a disallowed time like when in background.
|
///or requesting at a disallowed time like when in background.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
static final FAILURE_DISALLOWED =
|
static final FAILURE_DISALLOWED =
|
||||||
CustomTabsPostMessageResultType._internalMultiPlatform(-1, () {
|
CustomTabsPostMessageResultType._internalMultiPlatform(-1, () {
|
||||||
@ -35,7 +35,7 @@ class CustomTabsPostMessageResultType {
|
|||||||
|
|
||||||
///Indicates that the postMessage request has failed due to an internal error on the browser message channel.
|
///Indicates that the postMessage request has failed due to an internal error on the browser message channel.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
static final FAILURE_MESSAGING_ERROR =
|
static final FAILURE_MESSAGING_ERROR =
|
||||||
CustomTabsPostMessageResultType._internalMultiPlatform(-3, () {
|
CustomTabsPostMessageResultType._internalMultiPlatform(-3, () {
|
||||||
@ -50,7 +50,7 @@ class CustomTabsPostMessageResultType {
|
|||||||
|
|
||||||
///Indicates that the postMessage request has failed due to a `RemoteException`.
|
///Indicates that the postMessage request has failed due to a `RemoteException`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
static final FAILURE_REMOTE_ERROR =
|
static final FAILURE_REMOTE_ERROR =
|
||||||
CustomTabsPostMessageResultType._internalMultiPlatform(-2, () {
|
CustomTabsPostMessageResultType._internalMultiPlatform(-2, () {
|
||||||
@ -65,7 +65,7 @@ class CustomTabsPostMessageResultType {
|
|||||||
|
|
||||||
///Indicates that the postMessage request was accepted.
|
///Indicates that the postMessage request was accepted.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
static final SUCCESS =
|
static final SUCCESS =
|
||||||
CustomTabsPostMessageResultType._internalMultiPlatform(0, () {
|
CustomTabsPostMessageResultType._internalMultiPlatform(0, () {
|
||||||
|
@ -18,7 +18,7 @@ class CustomTabsRelationType {
|
|||||||
|
|
||||||
///Requests the ability to handle all URLs from a given origin.
|
///Requests the ability to handle all URLs from a given origin.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
static final HANDLE_ALL_URLS =
|
static final HANDLE_ALL_URLS =
|
||||||
CustomTabsRelationType._internalMultiPlatform(2, () {
|
CustomTabsRelationType._internalMultiPlatform(2, () {
|
||||||
@ -33,7 +33,7 @@ class CustomTabsRelationType {
|
|||||||
|
|
||||||
///For App -> Web transitions, requests the app to use the declared origin to be used as origin for the client app in the web APIs context.
|
///For App -> Web transitions, requests the app to use the declared origin to be used as origin for the client app in the web APIs context.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
static final USE_AS_ORIGIN =
|
static final USE_AS_ORIGIN =
|
||||||
CustomTabsRelationType._internalMultiPlatform(1, () {
|
CustomTabsRelationType._internalMultiPlatform(1, () {
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart';
|
import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart';
|
||||||
|
|
||||||
import '../web_uri.dart';
|
import '../web_uri.dart';
|
||||||
|
import '../in_app_webview/platform_webview.dart';
|
||||||
|
|
||||||
part 'download_start_request.g.dart';
|
part 'download_start_request.g.dart';
|
||||||
|
|
||||||
///Class representing a download request of the WebView used by the event [WebView.onDownloadStartRequest].
|
///Class representing a download request of the WebView used by the event [PlatformWebViewCreationParams.onDownloadStartRequest].
|
||||||
@ExchangeableObject()
|
@ExchangeableObject()
|
||||||
class DownloadStartRequest_ {
|
class DownloadStartRequest_ {
|
||||||
///The full url to the content that should be downloaded.
|
///The full url to the content that should be downloaded.
|
||||||
|
@ -6,7 +6,7 @@ part of 'download_start_request.dart';
|
|||||||
// ExchangeableObjectGenerator
|
// ExchangeableObjectGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
///Class representing a download request of the WebView used by the event [WebView.onDownloadStartRequest].
|
///Class representing a download request of the WebView used by the event [PlatformWebViewCreationParams.onDownloadStartRequest].
|
||||||
class DownloadStartRequest {
|
class DownloadStartRequest {
|
||||||
///Content-disposition http header, if present.
|
///Content-disposition http header, if present.
|
||||||
String? contentDisposition;
|
String? contentDisposition;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart';
|
import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart';
|
||||||
|
import '../in_app_webview/platform_webview.dart';
|
||||||
part 'form_resubmission_action.g.dart';
|
part 'form_resubmission_action.g.dart';
|
||||||
|
|
||||||
///Class that represents the action to take used by the [WebView.onFormResubmission] event.
|
///Class that represents the action to take used by the [PlatformWebViewCreationParams.onFormResubmission] event.
|
||||||
@ExchangeableEnum()
|
@ExchangeableEnum()
|
||||||
class FormResubmissionAction_ {
|
class FormResubmissionAction_ {
|
||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
|
@ -6,7 +6,7 @@ part of 'form_resubmission_action.dart';
|
|||||||
// ExchangeableEnumGenerator
|
// ExchangeableEnumGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
///Class that represents the action to take used by the [WebView.onFormResubmission] event.
|
///Class that represents the action to take used by the [PlatformWebViewCreationParams.onFormResubmission] event.
|
||||||
class FormResubmissionAction {
|
class FormResubmissionAction {
|
||||||
final int _value;
|
final int _value;
|
||||||
final int _nativeValue;
|
final int _nativeValue;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart';
|
import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart';
|
||||||
|
import '../in_app_webview/platform_webview.dart';
|
||||||
part 'geolocation_permission_show_prompt_response.g.dart';
|
part 'geolocation_permission_show_prompt_response.g.dart';
|
||||||
|
|
||||||
///Class used by the host application to set the Geolocation permission state for an origin during the [WebView.onGeolocationPermissionsShowPrompt] event.
|
///Class used by the host application to set the Geolocation permission state for an origin during the [PlatformWebViewCreationParams.onGeolocationPermissionsShowPrompt] event.
|
||||||
@ExchangeableObject()
|
@ExchangeableObject()
|
||||||
class GeolocationPermissionShowPromptResponse_ {
|
class GeolocationPermissionShowPromptResponse_ {
|
||||||
///The origin for which permissions are set.
|
///The origin for which permissions are set.
|
||||||
|
@ -6,7 +6,7 @@ part of 'geolocation_permission_show_prompt_response.dart';
|
|||||||
// ExchangeableObjectGenerator
|
// ExchangeableObjectGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
///Class used by the host application to set the Geolocation permission state for an origin during the [WebView.onGeolocationPermissionsShowPrompt] event.
|
///Class used by the host application to set the Geolocation permission state for an origin during the [PlatformWebViewCreationParams.onGeolocationPermissionsShowPrompt] event.
|
||||||
class GeolocationPermissionShowPromptResponse {
|
class GeolocationPermissionShowPromptResponse {
|
||||||
///Whether or not the origin should be allowed to use the Geolocation API.
|
///Whether or not the origin should be allowed to use the Geolocation API.
|
||||||
bool allow;
|
bool allow;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart';
|
import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart';
|
||||||
|
import '../in_app_webview/platform_webview.dart';
|
||||||
import 'http_auth_response_action.dart';
|
import 'http_auth_response_action.dart';
|
||||||
|
|
||||||
part 'http_auth_response.g.dart';
|
part 'http_auth_response.g.dart';
|
||||||
|
|
||||||
///Class that represents the response used by the [WebView.onReceivedHttpAuthRequest] event.
|
///Class that represents the response used by the [PlatformWebViewCreationParams.onReceivedHttpAuthRequest] event.
|
||||||
@ExchangeableObject()
|
@ExchangeableObject()
|
||||||
class HttpAuthResponse_ {
|
class HttpAuthResponse_ {
|
||||||
///Represents the username used for the authentication if the [action] corresponds to [HttpAuthResponseAction.PROCEED]
|
///Represents the username used for the authentication if the [action] corresponds to [HttpAuthResponseAction.PROCEED]
|
||||||
|
@ -6,7 +6,7 @@ part of 'http_auth_response.dart';
|
|||||||
// ExchangeableObjectGenerator
|
// ExchangeableObjectGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
///Class that represents the response used by the [WebView.onReceivedHttpAuthRequest] event.
|
///Class that represents the response used by the [PlatformWebViewCreationParams.onReceivedHttpAuthRequest] event.
|
||||||
class HttpAuthResponse {
|
class HttpAuthResponse {
|
||||||
///Indicate the [HttpAuthResponseAction] to take in response of the authentication challenge.
|
///Indicate the [HttpAuthResponseAction] to take in response of the authentication challenge.
|
||||||
HttpAuthResponseAction? action;
|
HttpAuthResponseAction? action;
|
||||||
|
@ -4,10 +4,11 @@ import 'url_credential.dart';
|
|||||||
import 'url_response.dart';
|
import 'url_response.dart';
|
||||||
import 'url_authentication_challenge.dart';
|
import 'url_authentication_challenge.dart';
|
||||||
import 'url_protection_space.dart';
|
import 'url_protection_space.dart';
|
||||||
|
import '../in_app_webview/platform_webview.dart';
|
||||||
|
|
||||||
part 'http_authentication_challenge.g.dart';
|
part 'http_authentication_challenge.g.dart';
|
||||||
|
|
||||||
///Class that represents the challenge of the [WebView.onReceivedHttpAuthRequest] event.
|
///Class that represents the challenge of the [PlatformWebViewCreationParams.onReceivedHttpAuthRequest] event.
|
||||||
///It provides all the information about the challenge.
|
///It provides all the information about the challenge.
|
||||||
@ExchangeableObject()
|
@ExchangeableObject()
|
||||||
class HttpAuthenticationChallenge_ extends URLAuthenticationChallenge_ {
|
class HttpAuthenticationChallenge_ extends URLAuthenticationChallenge_ {
|
||||||
|
@ -6,7 +6,7 @@ part of 'http_authentication_challenge.dart';
|
|||||||
// ExchangeableObjectGenerator
|
// ExchangeableObjectGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
///Class that represents the challenge of the [WebView.onReceivedHttpAuthRequest] event.
|
///Class that represents the challenge of the [PlatformWebViewCreationParams.onReceivedHttpAuthRequest] event.
|
||||||
///It provides all the information about the challenge.
|
///It provides all the information about the challenge.
|
||||||
class HttpAuthenticationChallenge extends URLAuthenticationChallenge {
|
class HttpAuthenticationChallenge extends URLAuthenticationChallenge {
|
||||||
///The error object representing the last authentication failure.
|
///The error object representing the last authentication failure.
|
||||||
|
@ -23,7 +23,7 @@ class InAppWebViewInitialData {
|
|||||||
|
|
||||||
///The URL to use as the history entry. If `null` defaults to `about:blank`. If non-null, this must be a valid URL.
|
///The URL to use as the history entry. If `null` defaults to `about:blank`. If non-null, this must be a valid URL.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
WebUri? historyUrl;
|
WebUri? historyUrl;
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart';
|
import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart';
|
||||||
|
import '../in_app_webview/platform_webview.dart';
|
||||||
import '../web_uri.dart';
|
import '../web_uri.dart';
|
||||||
|
|
||||||
part 'js_alert_request.g.dart';
|
part 'js_alert_request.g.dart';
|
||||||
|
|
||||||
///Class that represents the request of the [WebView.onJsAlert] event.
|
///Class that represents the request of the [PlatformWebViewCreationParams.onJsAlert] event.
|
||||||
@ExchangeableObject()
|
@ExchangeableObject()
|
||||||
class JsAlertRequest_ {
|
class JsAlertRequest_ {
|
||||||
///The url of the page requesting the dialog.
|
///The url of the page requesting the dialog.
|
||||||
|
@ -6,7 +6,7 @@ part of 'js_alert_request.dart';
|
|||||||
// ExchangeableObjectGenerator
|
// ExchangeableObjectGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
///Class that represents the request of the [WebView.onJsAlert] event.
|
///Class that represents the request of the [PlatformWebViewCreationParams.onJsAlert] event.
|
||||||
class JsAlertRequest {
|
class JsAlertRequest {
|
||||||
///Use [isMainFrame] instead.
|
///Use [isMainFrame] instead.
|
||||||
@Deprecated('Use isMainFrame instead')
|
@Deprecated('Use isMainFrame instead')
|
||||||
@ -14,7 +14,7 @@ class JsAlertRequest {
|
|||||||
|
|
||||||
///Indicates whether the request was made for the main frame.
|
///Indicates whether the request was made for the main frame.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Officially Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
bool? isMainFrame;
|
bool? isMainFrame;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart';
|
import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart';
|
||||||
|
import '../in_app_webview/platform_webview.dart';
|
||||||
import 'js_alert_response_action.dart';
|
import 'js_alert_response_action.dart';
|
||||||
|
|
||||||
part 'js_alert_response.g.dart';
|
part 'js_alert_response.g.dart';
|
||||||
|
|
||||||
///Class that represents the response used by the [WebView.onJsAlert] event to control a JavaScript alert dialog.
|
///Class that represents the response used by the [PlatformWebViewCreationParams.onJsAlert] event to control a JavaScript alert dialog.
|
||||||
@ExchangeableObject()
|
@ExchangeableObject()
|
||||||
class JsAlertResponse_ {
|
class JsAlertResponse_ {
|
||||||
///Message to be displayed in the window.
|
///Message to be displayed in the window.
|
||||||
|
@ -6,7 +6,7 @@ part of 'js_alert_response.dart';
|
|||||||
// ExchangeableObjectGenerator
|
// ExchangeableObjectGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
///Class that represents the response used by the [WebView.onJsAlert] event to control a JavaScript alert dialog.
|
///Class that represents the response used by the [PlatformWebViewCreationParams.onJsAlert] event to control a JavaScript alert dialog.
|
||||||
class JsAlertResponse {
|
class JsAlertResponse {
|
||||||
///Action used to confirm that the user hit confirm button.
|
///Action used to confirm that the user hit confirm button.
|
||||||
JsAlertResponseAction? action;
|
JsAlertResponseAction? action;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart';
|
import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart';
|
||||||
|
import '../in_app_webview/platform_webview.dart';
|
||||||
import '../web_uri.dart';
|
import '../web_uri.dart';
|
||||||
|
|
||||||
part 'js_before_unload_request.g.dart';
|
part 'js_before_unload_request.g.dart';
|
||||||
|
|
||||||
///Class that represents the request of the [WebView.onJsBeforeUnload] event.
|
///Class that represents the request of the [PlatformWebViewCreationParams.onJsBeforeUnload] event.
|
||||||
@ExchangeableObject()
|
@ExchangeableObject()
|
||||||
class JsBeforeUnloadRequest_ {
|
class JsBeforeUnloadRequest_ {
|
||||||
///The url of the page requesting the dialog.
|
///The url of the page requesting the dialog.
|
||||||
|
@ -6,7 +6,7 @@ part of 'js_before_unload_request.dart';
|
|||||||
// ExchangeableObjectGenerator
|
// ExchangeableObjectGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
///Class that represents the request of the [WebView.onJsBeforeUnload] event.
|
///Class that represents the request of the [PlatformWebViewCreationParams.onJsBeforeUnload] event.
|
||||||
class JsBeforeUnloadRequest {
|
class JsBeforeUnloadRequest {
|
||||||
///Message to be displayed in the window.
|
///Message to be displayed in the window.
|
||||||
String? message;
|
String? message;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart';
|
import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart';
|
||||||
|
import '../in_app_webview/platform_webview.dart';
|
||||||
import 'js_before_unload_response_action.dart';
|
import 'js_before_unload_response_action.dart';
|
||||||
|
|
||||||
part 'js_before_unload_response.g.dart';
|
part 'js_before_unload_response.g.dart';
|
||||||
|
|
||||||
///Class that represents the response used by the [WebView.onJsBeforeUnload] event to control a JavaScript alert dialog.
|
///Class that represents the response used by the [PlatformWebViewCreationParams.onJsBeforeUnload] event to control a JavaScript alert dialog.
|
||||||
@ExchangeableObject()
|
@ExchangeableObject()
|
||||||
class JsBeforeUnloadResponse_ {
|
class JsBeforeUnloadResponse_ {
|
||||||
///Message to be displayed in the window.
|
///Message to be displayed in the window.
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user