From 42edaa4573cc1fce172a14e3551edc1213c70ad5 Mon Sep 17 00:00:00 2001 From: tarrinneal Date: Wed, 30 Aug 2023 19:14:41 -0700 Subject: [PATCH] update pigeon --- .../local_auth_ios/pigeons/messages.dart | 4 +- .../webview_flutter_android/CHANGELOG.md | 4 + .../FileChooserParamsFlutterApiImpl.java | 18 +- .../GeneratedAndroidWebView.java | 319 ++++++------ .../webviewflutter/FileChooserParamsTest.java | 7 +- .../lib/src/android_webview.g.dart | 420 +++++++-------- .../lib/src/android_webview_api_impls.dart | 4 +- .../pigeons/android_webview.dart | 8 +- .../webview_flutter_android/pubspec.yaml | 4 +- .../test/android_webview_test.dart | 2 +- .../test/test_android_webview.g.dart | 482 ++++++++++-------- .../webview_flutter_wkwebview/CHANGELOG.md | 4 + .../ios/Classes/FWFGeneratedWebKitApis.h | 124 +++-- .../ios/Classes/FWFGeneratedWebKitApis.m | 361 +++++++------ .../lib/src/common/web_kit.g.dart | 178 +------ .../lib/src/web_kit/web_kit_api_impls.dart | 37 +- .../pigeons/web_kit.dart | 44 +- .../webview_flutter_wkwebview/pubspec.yaml | 4 +- .../test/src/common/test_web_kit.g.dart | 45 +- .../test/src/foundation/foundation_test.dart | 8 +- .../test/src/web_kit/web_kit_test.dart | 24 +- 21 files changed, 1001 insertions(+), 1100 deletions(-) diff --git a/packages/local_auth/local_auth_ios/pigeons/messages.dart b/packages/local_auth/local_auth_ios/pigeons/messages.dart index b230597684fc..67536140eceb 100644 --- a/packages/local_auth/local_auth_ios/pigeons/messages.dart +++ b/packages/local_auth/local_auth_ios/pigeons/messages.dart @@ -85,8 +85,8 @@ class AuthResultDetails { /// Pigeon equivalent of the subset of BiometricType used by iOS. enum AuthBiometric { face, fingerprint } -// TODO(stuartmorgan): Remove this when -// https://github.com/flutter/flutter/issues/87307 is implemented. +// TODO(stuartmorgan): Enums need be wrapped in a data class because thay can't +// be used as collection arguments. See https://github.com/flutter/flutter/issues/133728 class AuthBiometricWrapper { AuthBiometricWrapper({required this.value}); final AuthBiometric value; diff --git a/packages/webview_flutter/webview_flutter_android/CHANGELOG.md b/packages/webview_flutter/webview_flutter_android/CHANGELOG.md index 3efc759f1610..86685a2666bc 100644 --- a/packages/webview_flutter/webview_flutter_android/CHANGELOG.md +++ b/packages/webview_flutter/webview_flutter_android/CHANGELOG.md @@ -1,3 +1,7 @@ +## 3.9.5 + +* Updates pigeon to 11 and removes unneeded enum wrappers. + ## 3.9.4 * Adds pub topics to package metadata. diff --git a/packages/webview_flutter/webview_flutter_android/android/src/main/java/io/flutter/plugins/webviewflutter/FileChooserParamsFlutterApiImpl.java b/packages/webview_flutter/webview_flutter_android/android/src/main/java/io/flutter/plugins/webviewflutter/FileChooserParamsFlutterApiImpl.java index 626d868c69dc..5ad5923d5f2c 100644 --- a/packages/webview_flutter/webview_flutter_android/android/src/main/java/io/flutter/plugins/webviewflutter/FileChooserParamsFlutterApiImpl.java +++ b/packages/webview_flutter/webview_flutter_android/android/src/main/java/io/flutter/plugins/webviewflutter/FileChooserParamsFlutterApiImpl.java @@ -34,25 +34,21 @@ public FileChooserParamsFlutterApiImpl( this.instanceManager = instanceManager; } - private static GeneratedAndroidWebView.FileChooserModeEnumData toFileChooserEnumData(int mode) { - final GeneratedAndroidWebView.FileChooserModeEnumData.Builder builder = - new GeneratedAndroidWebView.FileChooserModeEnumData.Builder(); + private static GeneratedAndroidWebView.FileChooserMode toFileChooserEnumData(int mode) { switch (mode) { case WebChromeClient.FileChooserParams.MODE_OPEN: - builder.setValue(GeneratedAndroidWebView.FileChooserMode.OPEN); - break; + return GeneratedAndroidWebView.FileChooserMode.OPEN; + case WebChromeClient.FileChooserParams.MODE_OPEN_MULTIPLE: - builder.setValue(GeneratedAndroidWebView.FileChooserMode.OPEN_MULTIPLE); - break; + return GeneratedAndroidWebView.FileChooserMode.OPEN_MULTIPLE; + case WebChromeClient.FileChooserParams.MODE_SAVE: - builder.setValue(GeneratedAndroidWebView.FileChooserMode.SAVE); - break; + return GeneratedAndroidWebView.FileChooserMode.SAVE; + default: throw new IllegalArgumentException(String.format("Unsupported FileChooserMode: %d", mode)); } - - return builder.build(); } /** diff --git a/packages/webview_flutter/webview_flutter_android/android/src/main/java/io/flutter/plugins/webviewflutter/GeneratedAndroidWebView.java b/packages/webview_flutter/webview_flutter_android/android/src/main/java/io/flutter/plugins/webviewflutter/GeneratedAndroidWebView.java index cc52b0b10888..71c01f171725 100644 --- a/packages/webview_flutter/webview_flutter_android/android/src/main/java/io/flutter/plugins/webviewflutter/GeneratedAndroidWebView.java +++ b/packages/webview_flutter/webview_flutter_android/android/src/main/java/io/flutter/plugins/webviewflutter/GeneratedAndroidWebView.java @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v9.2.5), do not edit directly. +// Autogenerated from Pigeon (v11.0.1), do not edit directly. // See also: https://pub.dev/packages/pigeon package io.flutter.plugins.webviewflutter; @@ -94,55 +94,6 @@ private FileChooserMode(final int index) { } } - /** Generated class from Pigeon that represents data sent in messages. */ - public static final class FileChooserModeEnumData { - private @NonNull FileChooserMode value; - - public @NonNull FileChooserMode getValue() { - return value; - } - - public void setValue(@NonNull FileChooserMode setterArg) { - if (setterArg == null) { - throw new IllegalStateException("Nonnull field \"value\" is null."); - } - this.value = setterArg; - } - - /** Constructor is non-public to enforce null safety; use Builder. */ - FileChooserModeEnumData() {} - - public static final class Builder { - - private @Nullable FileChooserMode value; - - public @NonNull Builder setValue(@NonNull FileChooserMode setterArg) { - this.value = setterArg; - return this; - } - - public @NonNull FileChooserModeEnumData build() { - FileChooserModeEnumData pigeonReturn = new FileChooserModeEnumData(); - pigeonReturn.setValue(value); - return pigeonReturn; - } - } - - @NonNull - ArrayList toList() { - ArrayList toListResult = new ArrayList(1); - toListResult.add(value == null ? null : value.index); - return toListResult; - } - - static @NonNull FileChooserModeEnumData fromList(@NonNull ArrayList list) { - FileChooserModeEnumData pigeonResult = new FileChooserModeEnumData(); - Object value = list.get(0); - pigeonResult.setValue(value == null ? null : FileChooserMode.values()[(int) value]); - return pigeonResult; - } - } - /** Generated class from Pigeon that represents data sent in messages. */ public static final class WebResourceRequestData { private @NonNull String url; @@ -490,7 +441,9 @@ static void setup( { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.InstanceManagerHostApi.clear", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.webview_flutter_android.InstanceManagerHostApi.clear", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -534,7 +487,9 @@ static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable JavaObject { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.JavaObjectHostApi.dispose", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.webview_flutter_android.JavaObjectHostApi.dispose", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -583,7 +538,9 @@ public interface Reply { public void dispose(@NonNull Long identifierArg, @NonNull Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.JavaObjectFlutterApi.dispose", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.webview_flutter_android.JavaObjectFlutterApi.dispose", + getCodec()); channel.send( new ArrayList(Collections.singletonList(identifierArg)), channelReply -> callback.reply(null)); @@ -623,7 +580,7 @@ static void setup( BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.CookieManagerHostApi.attachInstance", + "dev.flutter.pigeon.webview_flutter_android.CookieManagerHostApi.attachInstance", getCodec()); if (api != null) { channel.setMessageHandler( @@ -648,7 +605,9 @@ static void setup( { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.CookieManagerHostApi.setCookie", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.webview_flutter_android.CookieManagerHostApi.setCookie", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -675,7 +634,7 @@ static void setup( BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.CookieManagerHostApi.removeAllCookies", + "dev.flutter.pigeon.webview_flutter_android.CookieManagerHostApi.removeAllCookies", getCodec()); if (api != null) { channel.setMessageHandler( @@ -707,7 +666,7 @@ public void error(Throwable error) { BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.CookieManagerHostApi.setAcceptThirdPartyCookies", + "dev.flutter.pigeon.webview_flutter_android.CookieManagerHostApi.setAcceptThirdPartyCookies", getCodec()); if (api != null) { channel.setMessageHandler( @@ -846,7 +805,9 @@ static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable WebViewHos { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.WebViewHostApi.create", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.create", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -869,7 +830,9 @@ static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable WebViewHos { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.WebViewHostApi.loadData", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.loadData", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -900,7 +863,7 @@ static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable WebViewHos BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.WebViewHostApi.loadDataWithBaseUrl", + "dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.loadDataWithBaseUrl", getCodec()); if (api != null) { channel.setMessageHandler( @@ -935,7 +898,9 @@ static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable WebViewHos { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.WebViewHostApi.loadUrl", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.loadUrl", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -963,7 +928,9 @@ static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable WebViewHos { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.WebViewHostApi.postUrl", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.postUrl", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -989,7 +956,9 @@ static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable WebViewHos { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.WebViewHostApi.getUrl", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.getUrl", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1013,7 +982,9 @@ static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable WebViewHos { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.WebViewHostApi.canGoBack", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.canGoBack", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1037,7 +1008,9 @@ static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable WebViewHos { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.WebViewHostApi.canGoForward", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.canGoForward", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1061,7 +1034,9 @@ static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable WebViewHos { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.WebViewHostApi.goBack", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.goBack", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1084,7 +1059,9 @@ static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable WebViewHos { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.WebViewHostApi.goForward", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.goForward", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1107,7 +1084,9 @@ static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable WebViewHos { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.WebViewHostApi.reload", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.reload", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1130,7 +1109,9 @@ static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable WebViewHos { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.WebViewHostApi.clearCache", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.clearCache", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1157,7 +1138,7 @@ static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable WebViewHos BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.WebViewHostApi.evaluateJavascript", + "dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.evaluateJavascript", getCodec()); if (api != null) { channel.setMessageHandler( @@ -1191,7 +1172,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.WebViewHostApi.getTitle", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.getTitle", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1215,7 +1198,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.WebViewHostApi.scrollTo", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.scrollTo", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1243,7 +1228,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.WebViewHostApi.scrollBy", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.scrollBy", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1271,7 +1258,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.WebViewHostApi.getScrollX", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.getScrollX", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1295,7 +1284,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.WebViewHostApi.getScrollY", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.getScrollY", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1319,7 +1310,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.WebViewHostApi.getScrollPosition", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.getScrollPosition", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1345,7 +1338,7 @@ public void error(Throwable error) { BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.WebViewHostApi.setWebContentsDebuggingEnabled", + "dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.setWebContentsDebuggingEnabled", getCodec()); if (api != null) { channel.setMessageHandler( @@ -1369,7 +1362,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.WebViewHostApi.setWebViewClient", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.setWebViewClient", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1398,7 +1393,7 @@ public void error(Throwable error) { BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.WebViewHostApi.addJavaScriptChannel", + "dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.addJavaScriptChannel", getCodec()); if (api != null) { channel.setMessageHandler( @@ -1428,7 +1423,7 @@ public void error(Throwable error) { BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.WebViewHostApi.removeJavaScriptChannel", + "dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.removeJavaScriptChannel", getCodec()); if (api != null) { channel.setMessageHandler( @@ -1458,7 +1453,7 @@ public void error(Throwable error) { BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.WebViewHostApi.setDownloadListener", + "dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.setDownloadListener", getCodec()); if (api != null) { channel.setMessageHandler( @@ -1486,7 +1481,7 @@ public void error(Throwable error) { BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.WebViewHostApi.setWebChromeClient", + "dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.setWebChromeClient", getCodec()); if (api != null) { channel.setMessageHandler( @@ -1514,7 +1509,7 @@ public void error(Throwable error) { BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.WebViewHostApi.setBackgroundColor", + "dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.setBackgroundColor", getCodec()); if (api != null) { channel.setMessageHandler( @@ -1570,7 +1565,9 @@ public interface Reply { public void create(@NonNull Long identifierArg, @NonNull Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.WebViewFlutterApi.create", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.webview_flutter_android.WebViewFlutterApi.create", + getCodec()); channel.send( new ArrayList(Collections.singletonList(identifierArg)), channelReply -> callback.reply(null)); @@ -1618,7 +1615,9 @@ static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable WebSetting { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.WebSettingsHostApi.create", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.create", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1645,7 +1644,7 @@ static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable WebSetting BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.WebSettingsHostApi.setDomStorageEnabled", + "dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setDomStorageEnabled", getCodec()); if (api != null) { channel.setMessageHandler( @@ -1672,7 +1671,7 @@ static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable WebSetting BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.WebSettingsHostApi.setJavaScriptCanOpenWindowsAutomatically", + "dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setJavaScriptCanOpenWindowsAutomatically", getCodec()); if (api != null) { channel.setMessageHandler( @@ -1699,7 +1698,7 @@ static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable WebSetting BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.WebSettingsHostApi.setSupportMultipleWindows", + "dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setSupportMultipleWindows", getCodec()); if (api != null) { channel.setMessageHandler( @@ -1726,7 +1725,7 @@ static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable WebSetting BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.WebSettingsHostApi.setJavaScriptEnabled", + "dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setJavaScriptEnabled", getCodec()); if (api != null) { channel.setMessageHandler( @@ -1753,7 +1752,7 @@ static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable WebSetting BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.WebSettingsHostApi.setUserAgentString", + "dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setUserAgentString", getCodec()); if (api != null) { channel.setMessageHandler( @@ -1781,7 +1780,7 @@ static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable WebSetting BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.WebSettingsHostApi.setMediaPlaybackRequiresUserGesture", + "dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setMediaPlaybackRequiresUserGesture", getCodec()); if (api != null) { channel.setMessageHandler( @@ -1808,7 +1807,7 @@ static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable WebSetting BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.WebSettingsHostApi.setSupportZoom", + "dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setSupportZoom", getCodec()); if (api != null) { channel.setMessageHandler( @@ -1835,7 +1834,7 @@ static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable WebSetting BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.WebSettingsHostApi.setLoadWithOverviewMode", + "dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setLoadWithOverviewMode", getCodec()); if (api != null) { channel.setMessageHandler( @@ -1862,7 +1861,7 @@ static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable WebSetting BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.WebSettingsHostApi.setUseWideViewPort", + "dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setUseWideViewPort", getCodec()); if (api != null) { channel.setMessageHandler( @@ -1889,7 +1888,7 @@ static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable WebSetting BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.WebSettingsHostApi.setDisplayZoomControls", + "dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setDisplayZoomControls", getCodec()); if (api != null) { channel.setMessageHandler( @@ -1916,7 +1915,7 @@ static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable WebSetting BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.WebSettingsHostApi.setBuiltInZoomControls", + "dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setBuiltInZoomControls", getCodec()); if (api != null) { channel.setMessageHandler( @@ -1943,7 +1942,7 @@ static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable WebSetting BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.WebSettingsHostApi.setAllowFileAccess", + "dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setAllowFileAccess", getCodec()); if (api != null) { channel.setMessageHandler( @@ -1969,7 +1968,9 @@ static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable WebSetting { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.WebSettingsHostApi.setTextZoom", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setTextZoom", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2012,7 +2013,9 @@ static void setup( { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.JavaScriptChannelHostApi.create", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.webview_flutter_android.JavaScriptChannelHostApi.create", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2059,7 +2062,7 @@ public void postMessage( BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.JavaScriptChannelFlutterApi.postMessage", + "dev.flutter.pigeon.webview_flutter_android.JavaScriptChannelFlutterApi.postMessage", getCodec()); channel.send( new ArrayList(Arrays.asList(instanceIdArg, messageArg)), @@ -2087,7 +2090,9 @@ static void setup( { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.WebViewClientHostApi.create", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.webview_flutter_android.WebViewClientHostApi.create", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2111,7 +2116,7 @@ static void setup( BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.WebViewClientHostApi.setSynchronousReturnValueForShouldOverrideUrlLoading", + "dev.flutter.pigeon.webview_flutter_android.WebViewClientHostApi.setSynchronousReturnValueForShouldOverrideUrlLoading", getCodec()); if (api != null) { channel.setMessageHandler( @@ -2194,7 +2199,7 @@ public void onPageStarted( BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.WebViewClientFlutterApi.onPageStarted", + "dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.onPageStarted", getCodec()); channel.send( new ArrayList(Arrays.asList(instanceIdArg, webViewInstanceIdArg, urlArg)), @@ -2209,7 +2214,7 @@ public void onPageFinished( BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.WebViewClientFlutterApi.onPageFinished", + "dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.onPageFinished", getCodec()); channel.send( new ArrayList(Arrays.asList(instanceIdArg, webViewInstanceIdArg, urlArg)), @@ -2225,7 +2230,7 @@ public void onReceivedRequestError( BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.WebViewClientFlutterApi.onReceivedRequestError", + "dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.onReceivedRequestError", getCodec()); channel.send( new ArrayList( @@ -2243,7 +2248,7 @@ public void onReceivedError( BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.WebViewClientFlutterApi.onReceivedError", + "dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.onReceivedError", getCodec()); channel.send( new ArrayList( @@ -2264,7 +2269,7 @@ public void requestLoading( BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.WebViewClientFlutterApi.requestLoading", + "dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.requestLoading", getCodec()); channel.send( new ArrayList(Arrays.asList(instanceIdArg, webViewInstanceIdArg, requestArg)), @@ -2278,7 +2283,9 @@ public void urlLoading( @NonNull Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.WebViewClientFlutterApi.urlLoading", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.urlLoading", + getCodec()); channel.send( new ArrayList(Arrays.asList(instanceIdArg, webViewInstanceIdArg, urlArg)), channelReply -> callback.reply(null)); @@ -2293,7 +2300,7 @@ public void doUpdateVisitedHistory( BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.WebViewClientFlutterApi.doUpdateVisitedHistory", + "dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.doUpdateVisitedHistory", getCodec()); channel.send( new ArrayList( @@ -2319,7 +2326,9 @@ static void setup( { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.DownloadListenerHostApi.create", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.webview_flutter_android.DownloadListenerHostApi.create", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2370,7 +2379,7 @@ public void onDownloadStart( BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.DownloadListenerFlutterApi.onDownloadStart", + "dev.flutter.pigeon.webview_flutter_android.DownloadListenerFlutterApi.onDownloadStart", getCodec()); channel.send( new ArrayList( @@ -2405,7 +2414,9 @@ static void setup( { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.WebChromeClientHostApi.create", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.webview_flutter_android.WebChromeClientHostApi.create", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2429,7 +2440,7 @@ static void setup( BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.WebChromeClientHostApi.setSynchronousReturnValueForOnShowFileChooser", + "dev.flutter.pigeon.webview_flutter_android.WebChromeClientHostApi.setSynchronousReturnValueForOnShowFileChooser", getCodec()); if (api != null) { channel.setMessageHandler( @@ -2476,7 +2487,9 @@ static void setup( { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.FlutterAssetManagerHostApi.list", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.webview_flutter_android.FlutterAssetManagerHostApi.list", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2500,7 +2513,7 @@ static void setup( BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.FlutterAssetManagerHostApi.getAssetFilePathByName", + "dev.flutter.pigeon.webview_flutter_android.FlutterAssetManagerHostApi.getAssetFilePathByName", getCodec()); if (api != null) { channel.setMessageHandler( @@ -2549,7 +2562,7 @@ public void onProgressChanged( BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.WebChromeClientFlutterApi.onProgressChanged", + "dev.flutter.pigeon.webview_flutter_android.WebChromeClientFlutterApi.onProgressChanged", getCodec()); channel.send( new ArrayList(Arrays.asList(instanceIdArg, webViewInstanceIdArg, progressArg)), @@ -2564,7 +2577,7 @@ public void onShowFileChooser( BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.WebChromeClientFlutterApi.onShowFileChooser", + "dev.flutter.pigeon.webview_flutter_android.WebChromeClientFlutterApi.onShowFileChooser", getCodec()); channel.send( new ArrayList( @@ -2583,7 +2596,7 @@ public void onPermissionRequest( BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.WebChromeClientFlutterApi.onPermissionRequest", + "dev.flutter.pigeon.webview_flutter_android.WebChromeClientFlutterApi.onPermissionRequest", getCodec()); channel.send( new ArrayList(Arrays.asList(instanceIdArg, requestInstanceIdArg)), @@ -2598,7 +2611,7 @@ public void onGeolocationPermissionsShowPrompt( BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.WebChromeClientFlutterApi.onGeolocationPermissionsShowPrompt", + "dev.flutter.pigeon.webview_flutter_android.WebChromeClientFlutterApi.onGeolocationPermissionsShowPrompt", getCodec()); channel.send( new ArrayList(Arrays.asList(instanceIdArg, paramsInstanceIdArg, originArg)), @@ -2610,7 +2623,7 @@ public void onGeolocationPermissionsHidePrompt( BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.WebChromeClientFlutterApi.onGeolocationPermissionsHidePrompt", + "dev.flutter.pigeon.webview_flutter_android.WebChromeClientFlutterApi.onGeolocationPermissionsHidePrompt", getCodec()); channel.send( new ArrayList(Collections.singletonList(identifierArg)), @@ -2635,7 +2648,9 @@ static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable WebStorage { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.WebStorageHostApi.create", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.webview_flutter_android.WebStorageHostApi.create", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2658,7 +2673,9 @@ static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable WebStorage { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.WebStorageHostApi.deleteAllData", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.webview_flutter_android.WebStorageHostApi.deleteAllData", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2680,34 +2697,6 @@ static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable WebStorage } } } - - private static class FileChooserParamsFlutterApiCodec extends StandardMessageCodec { - public static final FileChooserParamsFlutterApiCodec INSTANCE = - new FileChooserParamsFlutterApiCodec(); - - private FileChooserParamsFlutterApiCodec() {} - - @Override - protected Object readValueOfType(byte type, @NonNull ByteBuffer buffer) { - switch (type) { - case (byte) 128: - return FileChooserModeEnumData.fromList((ArrayList) readValue(buffer)); - default: - return super.readValueOfType(type, buffer); - } - } - - @Override - protected void writeValue(@NonNull ByteArrayOutputStream stream, Object value) { - if (value instanceof FileChooserModeEnumData) { - stream.write(128); - writeValue(stream, ((FileChooserModeEnumData) value).toList()); - } else { - super.writeValue(stream, value); - } - } - } - /** * Handles callbacks methods for the native Java FileChooserParams class. * @@ -2730,23 +2719,29 @@ public interface Reply { } /** The codec used by FileChooserParamsFlutterApi. */ static @NonNull MessageCodec getCodec() { - return FileChooserParamsFlutterApiCodec.INSTANCE; + return new StandardMessageCodec(); } public void create( @NonNull Long instanceIdArg, @NonNull Boolean isCaptureEnabledArg, @NonNull List acceptTypesArg, - @NonNull FileChooserModeEnumData modeArg, + @NonNull FileChooserMode modeArg, @Nullable String filenameHintArg, @NonNull Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.FileChooserParamsFlutterApi.create", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.webview_flutter_android.FileChooserParamsFlutterApi.create", + getCodec()); channel.send( new ArrayList( Arrays.asList( - instanceIdArg, isCaptureEnabledArg, acceptTypesArg, modeArg, filenameHintArg)), + instanceIdArg, + isCaptureEnabledArg, + acceptTypesArg, + modeArg.index, + filenameHintArg)), channelReply -> callback.reply(null)); } } @@ -2780,7 +2775,9 @@ static void setup( { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.PermissionRequestHostApi.grant", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.webview_flutter_android.PermissionRequestHostApi.grant", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2805,7 +2802,9 @@ static void setup( { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.PermissionRequestHostApi.deny", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.webview_flutter_android.PermissionRequestHostApi.deny", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2860,7 +2859,9 @@ public void create( @NonNull Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.PermissionRequestFlutterApi.create", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.webview_flutter_android.PermissionRequestFlutterApi.create", + getCodec()); channel.send( new ArrayList(Arrays.asList(instanceIdArg, resourcesArg)), channelReply -> callback.reply(null)); @@ -2900,7 +2901,7 @@ static void setup( BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.GeolocationPermissionsCallbackHostApi.invoke", + "dev.flutter.pigeon.webview_flutter_android.GeolocationPermissionsCallbackHostApi.invoke", getCodec()); if (api != null) { channel.setMessageHandler( @@ -2961,7 +2962,7 @@ public void create(@NonNull Long instanceIdArg, @NonNull Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, - "dev.flutter.pigeon.GeolocationPermissionsCallbackFlutterApi.create", + "dev.flutter.pigeon.webview_flutter_android.GeolocationPermissionsCallbackFlutterApi.create", getCodec()); channel.send( new ArrayList(Collections.singletonList(instanceIdArg)), diff --git a/packages/webview_flutter/webview_flutter_android/android/src/test/java/io/flutter/plugins/webviewflutter/FileChooserParamsTest.java b/packages/webview_flutter/webview_flutter_android/android/src/test/java/io/flutter/plugins/webviewflutter/FileChooserParamsTest.java index 0fb21cc474c3..412b48671e8d 100644 --- a/packages/webview_flutter/webview_flutter_android/android/src/test/java/io/flutter/plugins/webviewflutter/FileChooserParamsTest.java +++ b/packages/webview_flutter/webview_flutter_android/android/src/test/java/io/flutter/plugins/webviewflutter/FileChooserParamsTest.java @@ -57,8 +57,8 @@ public void flutterApiCreate() { final long identifier = Objects.requireNonNull( instanceManager.getIdentifierForStrongReference(mockFileChooserParams)); - final ArgumentCaptor modeCaptor = - ArgumentCaptor.forClass(GeneratedAndroidWebView.FileChooserModeEnumData.class); + final ArgumentCaptor modeCaptor = + ArgumentCaptor.forClass(GeneratedAndroidWebView.FileChooserMode.class); verify(spyFlutterApi) .create( @@ -68,7 +68,6 @@ public void flutterApiCreate() { modeCaptor.capture(), eq("filenameHint"), any()); - assertEquals( - modeCaptor.getValue().getValue(), GeneratedAndroidWebView.FileChooserMode.OPEN_MULTIPLE); + assertEquals(modeCaptor.getValue(), GeneratedAndroidWebView.FileChooserMode.OPEN_MULTIPLE); } } diff --git a/packages/webview_flutter/webview_flutter_android/lib/src/android_webview.g.dart b/packages/webview_flutter/webview_flutter_android/lib/src/android_webview.g.dart index 70473bfc13cf..b2a82fdf1ab8 100644 --- a/packages/webview_flutter/webview_flutter_android/lib/src/android_webview.g.dart +++ b/packages/webview_flutter/webview_flutter_android/lib/src/android_webview.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v9.2.5), do not edit directly. +// Autogenerated from Pigeon (v11.0.1), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import @@ -32,27 +32,6 @@ enum FileChooserMode { save, } -class FileChooserModeEnumData { - FileChooserModeEnumData({ - required this.value, - }); - - FileChooserMode value; - - Object encode() { - return [ - value.index, - ]; - } - - static FileChooserModeEnumData decode(Object result) { - result as List; - return FileChooserModeEnumData( - value: FileChooserMode.values[result[0]! as int], - ); - } -} - class WebResourceRequestData { WebResourceRequestData({ required this.url, @@ -168,7 +147,8 @@ class InstanceManagerHostApi { /// This is typically only used after a hot restart. Future clear() async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.InstanceManagerHostApi.clear', codec, + 'dev.flutter.pigeon.webview_flutter_android.InstanceManagerHostApi.clear', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send(null) as List?; if (replyList == null) { @@ -205,7 +185,8 @@ class JavaObjectHostApi { Future dispose(int arg_identifier) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.JavaObjectHostApi.dispose', codec, + 'dev.flutter.pigeon.webview_flutter_android.JavaObjectHostApi.dispose', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_identifier]) as List?; @@ -238,18 +219,19 @@ abstract class JavaObjectFlutterApi { {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.JavaObjectFlutterApi.dispose', codec, + 'dev.flutter.pigeon.webview_flutter_android.JavaObjectFlutterApi.dispose', + codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.JavaObjectFlutterApi.dispose was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.JavaObjectFlutterApi.dispose was null.'); final List args = (message as List?)!; final int? arg_identifier = (args[0] as int?); assert(arg_identifier != null, - 'Argument for dev.flutter.pigeon.JavaObjectFlutterApi.dispose was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.JavaObjectFlutterApi.dispose was null, expected non-null int.'); api.dispose(arg_identifier!); return; }); @@ -276,7 +258,8 @@ class CookieManagerHostApi { /// Handles attaching `CookieManager.instance` to a native instance. Future attachInstance(int arg_instanceIdentifier) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.CookieManagerHostApi.attachInstance', codec, + 'dev.flutter.pigeon.webview_flutter_android.CookieManagerHostApi.attachInstance', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_instanceIdentifier]) as List?; @@ -300,7 +283,8 @@ class CookieManagerHostApi { Future setCookie( int arg_identifier, String arg_url, String arg_value) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.CookieManagerHostApi.setCookie', codec, + 'dev.flutter.pigeon.webview_flutter_android.CookieManagerHostApi.setCookie', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel .send([arg_identifier, arg_url, arg_value]) as List?; @@ -323,7 +307,8 @@ class CookieManagerHostApi { /// Handles Dart method `CookieManager.removeAllCookies`. Future removeAllCookies(int arg_identifier) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.CookieManagerHostApi.removeAllCookies', codec, + 'dev.flutter.pigeon.webview_flutter_android.CookieManagerHostApi.removeAllCookies', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_identifier]) as List?; @@ -352,7 +337,7 @@ class CookieManagerHostApi { Future setAcceptThirdPartyCookies( int arg_identifier, int arg_webViewIdentifier, bool arg_accept) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.CookieManagerHostApi.setAcceptThirdPartyCookies', + 'dev.flutter.pigeon.webview_flutter_android.CookieManagerHostApi.setAcceptThirdPartyCookies', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel @@ -377,7 +362,6 @@ class CookieManagerHostApi { class _WebViewHostApiCodec extends StandardMessageCodec { const _WebViewHostApiCodec(); - @override void writeValue(WriteBuffer buffer, Object? value) { if (value is WebViewPoint) { @@ -411,7 +395,8 @@ class WebViewHostApi { Future create(int arg_instanceId) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.create', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.create', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_instanceId]) as List?; @@ -434,7 +419,8 @@ class WebViewHostApi { Future loadData(int arg_instanceId, String arg_data, String? arg_mimeType, String? arg_encoding) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.loadData', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.loadData', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send( [arg_instanceId, arg_data, arg_mimeType, arg_encoding]) @@ -463,7 +449,8 @@ class WebViewHostApi { String? arg_encoding, String? arg_historyUrl) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.loadDataWithBaseUrl', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.loadDataWithBaseUrl', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([ arg_instanceId, @@ -492,7 +479,8 @@ class WebViewHostApi { Future loadUrl(int arg_instanceId, String arg_url, Map arg_headers) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.loadUrl', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.loadUrl', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_instanceId, arg_url, arg_headers]) @@ -516,7 +504,8 @@ class WebViewHostApi { Future postUrl( int arg_instanceId, String arg_url, Uint8List arg_data) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.postUrl', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.postUrl', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel .send([arg_instanceId, arg_url, arg_data]) as List?; @@ -538,7 +527,8 @@ class WebViewHostApi { Future getUrl(int arg_instanceId) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.getUrl', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.getUrl', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_instanceId]) as List?; @@ -560,7 +550,8 @@ class WebViewHostApi { Future canGoBack(int arg_instanceId) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.canGoBack', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.canGoBack', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_instanceId]) as List?; @@ -587,7 +578,8 @@ class WebViewHostApi { Future canGoForward(int arg_instanceId) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.canGoForward', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.canGoForward', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_instanceId]) as List?; @@ -614,7 +606,8 @@ class WebViewHostApi { Future goBack(int arg_instanceId) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.goBack', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.goBack', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_instanceId]) as List?; @@ -636,7 +629,8 @@ class WebViewHostApi { Future goForward(int arg_instanceId) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.goForward', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.goForward', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_instanceId]) as List?; @@ -658,7 +652,8 @@ class WebViewHostApi { Future reload(int arg_instanceId) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.reload', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.reload', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_instanceId]) as List?; @@ -680,7 +675,8 @@ class WebViewHostApi { Future clearCache(int arg_instanceId, bool arg_includeDiskFiles) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.clearCache', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.clearCache', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_instanceId, arg_includeDiskFiles]) @@ -704,7 +700,8 @@ class WebViewHostApi { Future evaluateJavascript( int arg_instanceId, String arg_javascriptString) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.evaluateJavascript', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.evaluateJavascript', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_instanceId, arg_javascriptString]) @@ -727,7 +724,8 @@ class WebViewHostApi { Future getTitle(int arg_instanceId) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.getTitle', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.getTitle', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_instanceId]) as List?; @@ -749,7 +747,8 @@ class WebViewHostApi { Future scrollTo(int arg_instanceId, int arg_x, int arg_y) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.scrollTo', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.scrollTo', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel .send([arg_instanceId, arg_x, arg_y]) as List?; @@ -771,7 +770,8 @@ class WebViewHostApi { Future scrollBy(int arg_instanceId, int arg_x, int arg_y) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.scrollBy', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.scrollBy', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel .send([arg_instanceId, arg_x, arg_y]) as List?; @@ -793,7 +793,8 @@ class WebViewHostApi { Future getScrollX(int arg_instanceId) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.getScrollX', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.getScrollX', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_instanceId]) as List?; @@ -820,7 +821,8 @@ class WebViewHostApi { Future getScrollY(int arg_instanceId) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.getScrollY', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.getScrollY', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_instanceId]) as List?; @@ -847,7 +849,8 @@ class WebViewHostApi { Future getScrollPosition(int arg_instanceId) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.getScrollPosition', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.getScrollPosition', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_instanceId]) as List?; @@ -874,7 +877,7 @@ class WebViewHostApi { Future setWebContentsDebuggingEnabled(bool arg_enabled) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.setWebContentsDebuggingEnabled', + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.setWebContentsDebuggingEnabled', codec, binaryMessenger: _binaryMessenger); final List? replyList = @@ -898,7 +901,8 @@ class WebViewHostApi { Future setWebViewClient( int arg_instanceId, int arg_webViewClientInstanceId) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.setWebViewClient', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.setWebViewClient', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel .send([arg_instanceId, arg_webViewClientInstanceId]) @@ -922,7 +926,8 @@ class WebViewHostApi { Future addJavaScriptChannel( int arg_instanceId, int arg_javaScriptChannelInstanceId) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.addJavaScriptChannel', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.addJavaScriptChannel', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel .send([arg_instanceId, arg_javaScriptChannelInstanceId]) @@ -946,7 +951,8 @@ class WebViewHostApi { Future removeJavaScriptChannel( int arg_instanceId, int arg_javaScriptChannelInstanceId) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.removeJavaScriptChannel', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.removeJavaScriptChannel', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel .send([arg_instanceId, arg_javaScriptChannelInstanceId]) @@ -970,7 +976,8 @@ class WebViewHostApi { Future setDownloadListener( int arg_instanceId, int? arg_listenerInstanceId) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.setDownloadListener', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.setDownloadListener', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_instanceId, arg_listenerInstanceId]) @@ -994,7 +1001,8 @@ class WebViewHostApi { Future setWebChromeClient( int arg_instanceId, int? arg_clientInstanceId) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.setWebChromeClient', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.setWebChromeClient', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_instanceId, arg_clientInstanceId]) @@ -1017,7 +1025,8 @@ class WebViewHostApi { Future setBackgroundColor(int arg_instanceId, int arg_color) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.setBackgroundColor', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.setBackgroundColor', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel .send([arg_instanceId, arg_color]) as List?; @@ -1055,18 +1064,19 @@ abstract class WebViewFlutterApi { {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewFlutterApi.create', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewFlutterApi.create', + codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebViewFlutterApi.create was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewFlutterApi.create was null.'); final List args = (message as List?)!; final int? arg_identifier = (args[0] as int?); assert(arg_identifier != null, - 'Argument for dev.flutter.pigeon.WebViewFlutterApi.create was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewFlutterApi.create was null, expected non-null int.'); api.create(arg_identifier!); return; }); @@ -1087,7 +1097,8 @@ class WebSettingsHostApi { Future create(int arg_instanceId, int arg_webViewInstanceId) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebSettingsHostApi.create', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.create', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_instanceId, arg_webViewInstanceId]) @@ -1110,7 +1121,8 @@ class WebSettingsHostApi { Future setDomStorageEnabled(int arg_instanceId, bool arg_flag) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebSettingsHostApi.setDomStorageEnabled', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setDomStorageEnabled', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel .send([arg_instanceId, arg_flag]) as List?; @@ -1133,7 +1145,7 @@ class WebSettingsHostApi { Future setJavaScriptCanOpenWindowsAutomatically( int arg_instanceId, bool arg_flag) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebSettingsHostApi.setJavaScriptCanOpenWindowsAutomatically', + 'dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setJavaScriptCanOpenWindowsAutomatically', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel @@ -1157,7 +1169,7 @@ class WebSettingsHostApi { Future setSupportMultipleWindows( int arg_instanceId, bool arg_support) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebSettingsHostApi.setSupportMultipleWindows', + 'dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setSupportMultipleWindows', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel @@ -1180,7 +1192,8 @@ class WebSettingsHostApi { Future setJavaScriptEnabled(int arg_instanceId, bool arg_flag) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebSettingsHostApi.setJavaScriptEnabled', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setJavaScriptEnabled', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel .send([arg_instanceId, arg_flag]) as List?; @@ -1203,7 +1216,8 @@ class WebSettingsHostApi { Future setUserAgentString( int arg_instanceId, String? arg_userAgentString) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebSettingsHostApi.setUserAgentString', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setUserAgentString', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel .send([arg_instanceId, arg_userAgentString]) as List?; @@ -1226,7 +1240,7 @@ class WebSettingsHostApi { Future setMediaPlaybackRequiresUserGesture( int arg_instanceId, bool arg_require) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebSettingsHostApi.setMediaPlaybackRequiresUserGesture', + 'dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setMediaPlaybackRequiresUserGesture', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel @@ -1249,7 +1263,8 @@ class WebSettingsHostApi { Future setSupportZoom(int arg_instanceId, bool arg_support) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebSettingsHostApi.setSupportZoom', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setSupportZoom', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel .send([arg_instanceId, arg_support]) as List?; @@ -1272,7 +1287,8 @@ class WebSettingsHostApi { Future setLoadWithOverviewMode( int arg_instanceId, bool arg_overview) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebSettingsHostApi.setLoadWithOverviewMode', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setLoadWithOverviewMode', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel .send([arg_instanceId, arg_overview]) as List?; @@ -1294,7 +1310,8 @@ class WebSettingsHostApi { Future setUseWideViewPort(int arg_instanceId, bool arg_use) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebSettingsHostApi.setUseWideViewPort', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setUseWideViewPort', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel .send([arg_instanceId, arg_use]) as List?; @@ -1317,7 +1334,8 @@ class WebSettingsHostApi { Future setDisplayZoomControls( int arg_instanceId, bool arg_enabled) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebSettingsHostApi.setDisplayZoomControls', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setDisplayZoomControls', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel .send([arg_instanceId, arg_enabled]) as List?; @@ -1340,7 +1358,8 @@ class WebSettingsHostApi { Future setBuiltInZoomControls( int arg_instanceId, bool arg_enabled) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebSettingsHostApi.setBuiltInZoomControls', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setBuiltInZoomControls', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel .send([arg_instanceId, arg_enabled]) as List?; @@ -1362,7 +1381,8 @@ class WebSettingsHostApi { Future setAllowFileAccess(int arg_instanceId, bool arg_enabled) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebSettingsHostApi.setAllowFileAccess', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setAllowFileAccess', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel .send([arg_instanceId, arg_enabled]) as List?; @@ -1384,7 +1404,8 @@ class WebSettingsHostApi { Future setTextZoom(int arg_instanceId, int arg_textZoom) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebSettingsHostApi.setTextZoom', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setTextZoom', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel .send([arg_instanceId, arg_textZoom]) as List?; @@ -1417,7 +1438,8 @@ class JavaScriptChannelHostApi { Future create(int arg_instanceId, String arg_channelName) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.JavaScriptChannelHostApi.create', codec, + 'dev.flutter.pigeon.webview_flutter_android.JavaScriptChannelHostApi.create', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel .send([arg_instanceId, arg_channelName]) as List?; @@ -1447,21 +1469,22 @@ abstract class JavaScriptChannelFlutterApi { {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.JavaScriptChannelFlutterApi.postMessage', codec, + 'dev.flutter.pigeon.webview_flutter_android.JavaScriptChannelFlutterApi.postMessage', + codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.JavaScriptChannelFlutterApi.postMessage was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.JavaScriptChannelFlutterApi.postMessage was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.JavaScriptChannelFlutterApi.postMessage was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.JavaScriptChannelFlutterApi.postMessage was null, expected non-null int.'); final String? arg_message = (args[1] as String?); assert(arg_message != null, - 'Argument for dev.flutter.pigeon.JavaScriptChannelFlutterApi.postMessage was null, expected non-null String.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.JavaScriptChannelFlutterApi.postMessage was null, expected non-null String.'); api.postMessage(arg_instanceId!, arg_message!); return; }); @@ -1482,7 +1505,8 @@ class WebViewClientHostApi { Future create(int arg_instanceId) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewClientHostApi.create', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewClientHostApi.create', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_instanceId]) as List?; @@ -1505,7 +1529,7 @@ class WebViewClientHostApi { Future setSynchronousReturnValueForShouldOverrideUrlLoading( int arg_instanceId, bool arg_value) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewClientHostApi.setSynchronousReturnValueForShouldOverrideUrlLoading', + 'dev.flutter.pigeon.webview_flutter_android.WebViewClientHostApi.setSynchronousReturnValueForShouldOverrideUrlLoading', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel @@ -1529,7 +1553,6 @@ class WebViewClientHostApi { class _WebViewClientFlutterApiCodec extends StandardMessageCodec { const _WebViewClientFlutterApiCodec(); - @override void writeValue(WriteBuffer buffer, Object? value) { if (value is WebResourceErrorData) { @@ -1581,24 +1604,25 @@ abstract class WebViewClientFlutterApi { {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewClientFlutterApi.onPageStarted', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.onPageStarted', + codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebViewClientFlutterApi.onPageStarted was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.onPageStarted was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebViewClientFlutterApi.onPageStarted was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.onPageStarted was null, expected non-null int.'); final int? arg_webViewInstanceId = (args[1] as int?); assert(arg_webViewInstanceId != null, - 'Argument for dev.flutter.pigeon.WebViewClientFlutterApi.onPageStarted was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.onPageStarted was null, expected non-null int.'); final String? arg_url = (args[2] as String?); assert(arg_url != null, - 'Argument for dev.flutter.pigeon.WebViewClientFlutterApi.onPageStarted was null, expected non-null String.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.onPageStarted was null, expected non-null String.'); api.onPageStarted(arg_instanceId!, arg_webViewInstanceId!, arg_url!); return; }); @@ -1606,24 +1630,25 @@ abstract class WebViewClientFlutterApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewClientFlutterApi.onPageFinished', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.onPageFinished', + codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebViewClientFlutterApi.onPageFinished was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.onPageFinished was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebViewClientFlutterApi.onPageFinished was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.onPageFinished was null, expected non-null int.'); final int? arg_webViewInstanceId = (args[1] as int?); assert(arg_webViewInstanceId != null, - 'Argument for dev.flutter.pigeon.WebViewClientFlutterApi.onPageFinished was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.onPageFinished was null, expected non-null int.'); final String? arg_url = (args[2] as String?); assert(arg_url != null, - 'Argument for dev.flutter.pigeon.WebViewClientFlutterApi.onPageFinished was null, expected non-null String.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.onPageFinished was null, expected non-null String.'); api.onPageFinished(arg_instanceId!, arg_webViewInstanceId!, arg_url!); return; }); @@ -1631,7 +1656,7 @@ abstract class WebViewClientFlutterApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewClientFlutterApi.onReceivedRequestError', + 'dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.onReceivedRequestError', codec, binaryMessenger: binaryMessenger); if (api == null) { @@ -1639,22 +1664,22 @@ abstract class WebViewClientFlutterApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebViewClientFlutterApi.onReceivedRequestError was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.onReceivedRequestError was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebViewClientFlutterApi.onReceivedRequestError was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.onReceivedRequestError was null, expected non-null int.'); final int? arg_webViewInstanceId = (args[1] as int?); assert(arg_webViewInstanceId != null, - 'Argument for dev.flutter.pigeon.WebViewClientFlutterApi.onReceivedRequestError was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.onReceivedRequestError was null, expected non-null int.'); final WebResourceRequestData? arg_request = (args[2] as WebResourceRequestData?); assert(arg_request != null, - 'Argument for dev.flutter.pigeon.WebViewClientFlutterApi.onReceivedRequestError was null, expected non-null WebResourceRequestData.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.onReceivedRequestError was null, expected non-null WebResourceRequestData.'); final WebResourceErrorData? arg_error = (args[3] as WebResourceErrorData?); assert(arg_error != null, - 'Argument for dev.flutter.pigeon.WebViewClientFlutterApi.onReceivedRequestError was null, expected non-null WebResourceErrorData.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.onReceivedRequestError was null, expected non-null WebResourceErrorData.'); api.onReceivedRequestError(arg_instanceId!, arg_webViewInstanceId!, arg_request!, arg_error!); return; @@ -1663,30 +1688,31 @@ abstract class WebViewClientFlutterApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewClientFlutterApi.onReceivedError', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.onReceivedError', + codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebViewClientFlutterApi.onReceivedError was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.onReceivedError was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebViewClientFlutterApi.onReceivedError was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.onReceivedError was null, expected non-null int.'); final int? arg_webViewInstanceId = (args[1] as int?); assert(arg_webViewInstanceId != null, - 'Argument for dev.flutter.pigeon.WebViewClientFlutterApi.onReceivedError was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.onReceivedError was null, expected non-null int.'); final int? arg_errorCode = (args[2] as int?); assert(arg_errorCode != null, - 'Argument for dev.flutter.pigeon.WebViewClientFlutterApi.onReceivedError was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.onReceivedError was null, expected non-null int.'); final String? arg_description = (args[3] as String?); assert(arg_description != null, - 'Argument for dev.flutter.pigeon.WebViewClientFlutterApi.onReceivedError was null, expected non-null String.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.onReceivedError was null, expected non-null String.'); final String? arg_failingUrl = (args[4] as String?); assert(arg_failingUrl != null, - 'Argument for dev.flutter.pigeon.WebViewClientFlutterApi.onReceivedError was null, expected non-null String.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.onReceivedError was null, expected non-null String.'); api.onReceivedError(arg_instanceId!, arg_webViewInstanceId!, arg_errorCode!, arg_description!, arg_failingUrl!); return; @@ -1695,25 +1721,26 @@ abstract class WebViewClientFlutterApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewClientFlutterApi.requestLoading', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.requestLoading', + codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebViewClientFlutterApi.requestLoading was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.requestLoading was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebViewClientFlutterApi.requestLoading was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.requestLoading was null, expected non-null int.'); final int? arg_webViewInstanceId = (args[1] as int?); assert(arg_webViewInstanceId != null, - 'Argument for dev.flutter.pigeon.WebViewClientFlutterApi.requestLoading was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.requestLoading was null, expected non-null int.'); final WebResourceRequestData? arg_request = (args[2] as WebResourceRequestData?); assert(arg_request != null, - 'Argument for dev.flutter.pigeon.WebViewClientFlutterApi.requestLoading was null, expected non-null WebResourceRequestData.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.requestLoading was null, expected non-null WebResourceRequestData.'); api.requestLoading( arg_instanceId!, arg_webViewInstanceId!, arg_request!); return; @@ -1722,24 +1749,25 @@ abstract class WebViewClientFlutterApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewClientFlutterApi.urlLoading', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.urlLoading', + codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebViewClientFlutterApi.urlLoading was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.urlLoading was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebViewClientFlutterApi.urlLoading was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.urlLoading was null, expected non-null int.'); final int? arg_webViewInstanceId = (args[1] as int?); assert(arg_webViewInstanceId != null, - 'Argument for dev.flutter.pigeon.WebViewClientFlutterApi.urlLoading was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.urlLoading was null, expected non-null int.'); final String? arg_url = (args[2] as String?); assert(arg_url != null, - 'Argument for dev.flutter.pigeon.WebViewClientFlutterApi.urlLoading was null, expected non-null String.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.urlLoading was null, expected non-null String.'); api.urlLoading(arg_instanceId!, arg_webViewInstanceId!, arg_url!); return; }); @@ -1747,7 +1775,7 @@ abstract class WebViewClientFlutterApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewClientFlutterApi.doUpdateVisitedHistory', + 'dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.doUpdateVisitedHistory', codec, binaryMessenger: binaryMessenger); if (api == null) { @@ -1755,20 +1783,20 @@ abstract class WebViewClientFlutterApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebViewClientFlutterApi.doUpdateVisitedHistory was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.doUpdateVisitedHistory was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebViewClientFlutterApi.doUpdateVisitedHistory was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.doUpdateVisitedHistory was null, expected non-null int.'); final int? arg_webViewInstanceId = (args[1] as int?); assert(arg_webViewInstanceId != null, - 'Argument for dev.flutter.pigeon.WebViewClientFlutterApi.doUpdateVisitedHistory was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.doUpdateVisitedHistory was null, expected non-null int.'); final String? arg_url = (args[2] as String?); assert(arg_url != null, - 'Argument for dev.flutter.pigeon.WebViewClientFlutterApi.doUpdateVisitedHistory was null, expected non-null String.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.doUpdateVisitedHistory was null, expected non-null String.'); final bool? arg_isReload = (args[3] as bool?); assert(arg_isReload != null, - 'Argument for dev.flutter.pigeon.WebViewClientFlutterApi.doUpdateVisitedHistory was null, expected non-null bool.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewClientFlutterApi.doUpdateVisitedHistory was null, expected non-null bool.'); api.doUpdateVisitedHistory( arg_instanceId!, arg_webViewInstanceId!, arg_url!, arg_isReload!); return; @@ -1790,7 +1818,8 @@ class DownloadListenerHostApi { Future create(int arg_instanceId) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.DownloadListenerHostApi.create', codec, + 'dev.flutter.pigeon.webview_flutter_android.DownloadListenerHostApi.create', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_instanceId]) as List?; @@ -1821,7 +1850,7 @@ abstract class DownloadListenerFlutterApi { {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.DownloadListenerFlutterApi.onDownloadStart', + 'dev.flutter.pigeon.webview_flutter_android.DownloadListenerFlutterApi.onDownloadStart', codec, binaryMessenger: binaryMessenger); if (api == null) { @@ -1829,26 +1858,26 @@ abstract class DownloadListenerFlutterApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.DownloadListenerFlutterApi.onDownloadStart was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.DownloadListenerFlutterApi.onDownloadStart was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.DownloadListenerFlutterApi.onDownloadStart was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.DownloadListenerFlutterApi.onDownloadStart was null, expected non-null int.'); final String? arg_url = (args[1] as String?); assert(arg_url != null, - 'Argument for dev.flutter.pigeon.DownloadListenerFlutterApi.onDownloadStart was null, expected non-null String.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.DownloadListenerFlutterApi.onDownloadStart was null, expected non-null String.'); final String? arg_userAgent = (args[2] as String?); assert(arg_userAgent != null, - 'Argument for dev.flutter.pigeon.DownloadListenerFlutterApi.onDownloadStart was null, expected non-null String.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.DownloadListenerFlutterApi.onDownloadStart was null, expected non-null String.'); final String? arg_contentDisposition = (args[3] as String?); assert(arg_contentDisposition != null, - 'Argument for dev.flutter.pigeon.DownloadListenerFlutterApi.onDownloadStart was null, expected non-null String.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.DownloadListenerFlutterApi.onDownloadStart was null, expected non-null String.'); final String? arg_mimetype = (args[4] as String?); assert(arg_mimetype != null, - 'Argument for dev.flutter.pigeon.DownloadListenerFlutterApi.onDownloadStart was null, expected non-null String.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.DownloadListenerFlutterApi.onDownloadStart was null, expected non-null String.'); final int? arg_contentLength = (args[5] as int?); assert(arg_contentLength != null, - 'Argument for dev.flutter.pigeon.DownloadListenerFlutterApi.onDownloadStart was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.DownloadListenerFlutterApi.onDownloadStart was null, expected non-null int.'); api.onDownloadStart(arg_instanceId!, arg_url!, arg_userAgent!, arg_contentDisposition!, arg_mimetype!, arg_contentLength!); return; @@ -1870,7 +1899,8 @@ class WebChromeClientHostApi { Future create(int arg_instanceId) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebChromeClientHostApi.create', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebChromeClientHostApi.create', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_instanceId]) as List?; @@ -1893,7 +1923,7 @@ class WebChromeClientHostApi { Future setSynchronousReturnValueForOnShowFileChooser( int arg_instanceId, bool arg_value) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebChromeClientHostApi.setSynchronousReturnValueForOnShowFileChooser', + 'dev.flutter.pigeon.webview_flutter_android.WebChromeClientHostApi.setSynchronousReturnValueForOnShowFileChooser', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel @@ -1927,7 +1957,8 @@ class FlutterAssetManagerHostApi { Future> list(String arg_path) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.FlutterAssetManagerHostApi.list', codec, + 'dev.flutter.pigeon.webview_flutter_android.FlutterAssetManagerHostApi.list', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_path]) as List?; @@ -1954,7 +1985,7 @@ class FlutterAssetManagerHostApi { Future getAssetFilePathByName(String arg_name) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.FlutterAssetManagerHostApi.getAssetFilePathByName', + 'dev.flutter.pigeon.webview_flutter_android.FlutterAssetManagerHostApi.getAssetFilePathByName', codec, binaryMessenger: _binaryMessenger); final List? replyList = @@ -2003,7 +2034,7 @@ abstract class WebChromeClientFlutterApi { {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebChromeClientFlutterApi.onProgressChanged', + 'dev.flutter.pigeon.webview_flutter_android.WebChromeClientFlutterApi.onProgressChanged', codec, binaryMessenger: binaryMessenger); if (api == null) { @@ -2011,17 +2042,17 @@ abstract class WebChromeClientFlutterApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebChromeClientFlutterApi.onProgressChanged was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebChromeClientFlutterApi.onProgressChanged was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebChromeClientFlutterApi.onProgressChanged was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebChromeClientFlutterApi.onProgressChanged was null, expected non-null int.'); final int? arg_webViewInstanceId = (args[1] as int?); assert(arg_webViewInstanceId != null, - 'Argument for dev.flutter.pigeon.WebChromeClientFlutterApi.onProgressChanged was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebChromeClientFlutterApi.onProgressChanged was null, expected non-null int.'); final int? arg_progress = (args[2] as int?); assert(arg_progress != null, - 'Argument for dev.flutter.pigeon.WebChromeClientFlutterApi.onProgressChanged was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebChromeClientFlutterApi.onProgressChanged was null, expected non-null int.'); api.onProgressChanged( arg_instanceId!, arg_webViewInstanceId!, arg_progress!); return; @@ -2030,7 +2061,7 @@ abstract class WebChromeClientFlutterApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebChromeClientFlutterApi.onShowFileChooser', + 'dev.flutter.pigeon.webview_flutter_android.WebChromeClientFlutterApi.onShowFileChooser', codec, binaryMessenger: binaryMessenger); if (api == null) { @@ -2038,17 +2069,17 @@ abstract class WebChromeClientFlutterApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebChromeClientFlutterApi.onShowFileChooser was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebChromeClientFlutterApi.onShowFileChooser was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebChromeClientFlutterApi.onShowFileChooser was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebChromeClientFlutterApi.onShowFileChooser was null, expected non-null int.'); final int? arg_webViewInstanceId = (args[1] as int?); assert(arg_webViewInstanceId != null, - 'Argument for dev.flutter.pigeon.WebChromeClientFlutterApi.onShowFileChooser was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebChromeClientFlutterApi.onShowFileChooser was null, expected non-null int.'); final int? arg_paramsInstanceId = (args[2] as int?); assert(arg_paramsInstanceId != null, - 'Argument for dev.flutter.pigeon.WebChromeClientFlutterApi.onShowFileChooser was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebChromeClientFlutterApi.onShowFileChooser was null, expected non-null int.'); final List output = await api.onShowFileChooser( arg_instanceId!, arg_webViewInstanceId!, arg_paramsInstanceId!); return output; @@ -2057,7 +2088,7 @@ abstract class WebChromeClientFlutterApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebChromeClientFlutterApi.onPermissionRequest', + 'dev.flutter.pigeon.webview_flutter_android.WebChromeClientFlutterApi.onPermissionRequest', codec, binaryMessenger: binaryMessenger); if (api == null) { @@ -2065,14 +2096,14 @@ abstract class WebChromeClientFlutterApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebChromeClientFlutterApi.onPermissionRequest was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebChromeClientFlutterApi.onPermissionRequest was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebChromeClientFlutterApi.onPermissionRequest was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebChromeClientFlutterApi.onPermissionRequest was null, expected non-null int.'); final int? arg_requestInstanceId = (args[1] as int?); assert(arg_requestInstanceId != null, - 'Argument for dev.flutter.pigeon.WebChromeClientFlutterApi.onPermissionRequest was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebChromeClientFlutterApi.onPermissionRequest was null, expected non-null int.'); api.onPermissionRequest(arg_instanceId!, arg_requestInstanceId!); return; }); @@ -2080,7 +2111,7 @@ abstract class WebChromeClientFlutterApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebChromeClientFlutterApi.onGeolocationPermissionsShowPrompt', + 'dev.flutter.pigeon.webview_flutter_android.WebChromeClientFlutterApi.onGeolocationPermissionsShowPrompt', codec, binaryMessenger: binaryMessenger); if (api == null) { @@ -2088,17 +2119,17 @@ abstract class WebChromeClientFlutterApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebChromeClientFlutterApi.onGeolocationPermissionsShowPrompt was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebChromeClientFlutterApi.onGeolocationPermissionsShowPrompt was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebChromeClientFlutterApi.onGeolocationPermissionsShowPrompt was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebChromeClientFlutterApi.onGeolocationPermissionsShowPrompt was null, expected non-null int.'); final int? arg_paramsInstanceId = (args[1] as int?); assert(arg_paramsInstanceId != null, - 'Argument for dev.flutter.pigeon.WebChromeClientFlutterApi.onGeolocationPermissionsShowPrompt was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebChromeClientFlutterApi.onGeolocationPermissionsShowPrompt was null, expected non-null int.'); final String? arg_origin = (args[2] as String?); assert(arg_origin != null, - 'Argument for dev.flutter.pigeon.WebChromeClientFlutterApi.onGeolocationPermissionsShowPrompt was null, expected non-null String.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebChromeClientFlutterApi.onGeolocationPermissionsShowPrompt was null, expected non-null String.'); api.onGeolocationPermissionsShowPrompt( arg_instanceId!, arg_paramsInstanceId!, arg_origin!); return; @@ -2107,7 +2138,7 @@ abstract class WebChromeClientFlutterApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebChromeClientFlutterApi.onGeolocationPermissionsHidePrompt', + 'dev.flutter.pigeon.webview_flutter_android.WebChromeClientFlutterApi.onGeolocationPermissionsHidePrompt', codec, binaryMessenger: binaryMessenger); if (api == null) { @@ -2115,11 +2146,11 @@ abstract class WebChromeClientFlutterApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebChromeClientFlutterApi.onGeolocationPermissionsHidePrompt was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebChromeClientFlutterApi.onGeolocationPermissionsHidePrompt was null.'); final List args = (message as List?)!; final int? arg_identifier = (args[0] as int?); assert(arg_identifier != null, - 'Argument for dev.flutter.pigeon.WebChromeClientFlutterApi.onGeolocationPermissionsHidePrompt was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebChromeClientFlutterApi.onGeolocationPermissionsHidePrompt was null, expected non-null int.'); api.onGeolocationPermissionsHidePrompt(arg_identifier!); return; }); @@ -2140,7 +2171,8 @@ class WebStorageHostApi { Future create(int arg_instanceId) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebStorageHostApi.create', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebStorageHostApi.create', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_instanceId]) as List?; @@ -2162,7 +2194,8 @@ class WebStorageHostApi { Future deleteAllData(int arg_instanceId) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebStorageHostApi.deleteAllData', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebStorageHostApi.deleteAllData', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_instanceId]) as List?; @@ -2183,67 +2216,43 @@ class WebStorageHostApi { } } -class _FileChooserParamsFlutterApiCodec extends StandardMessageCodec { - const _FileChooserParamsFlutterApiCodec(); - - @override - void writeValue(WriteBuffer buffer, Object? value) { - if (value is FileChooserModeEnumData) { - buffer.putUint8(128); - writeValue(buffer, value.encode()); - } else { - super.writeValue(buffer, value); - } - } - - @override - Object? readValueOfType(int type, ReadBuffer buffer) { - switch (type) { - case 128: - return FileChooserModeEnumData.decode(readValue(buffer)!); - default: - return super.readValueOfType(type, buffer); - } - } -} - /// Handles callbacks methods for the native Java FileChooserParams class. /// /// See https://developer.android.com/reference/android/webkit/WebChromeClient.FileChooserParams. abstract class FileChooserParamsFlutterApi { - static const MessageCodec codec = - _FileChooserParamsFlutterApiCodec(); + static const MessageCodec codec = StandardMessageCodec(); void create(int instanceId, bool isCaptureEnabled, List acceptTypes, - FileChooserModeEnumData mode, String? filenameHint); + FileChooserMode mode, String? filenameHint); static void setup(FileChooserParamsFlutterApi? api, {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.FileChooserParamsFlutterApi.create', codec, + 'dev.flutter.pigeon.webview_flutter_android.FileChooserParamsFlutterApi.create', + codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FileChooserParamsFlutterApi.create was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.FileChooserParamsFlutterApi.create was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.FileChooserParamsFlutterApi.create was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.FileChooserParamsFlutterApi.create was null, expected non-null int.'); final bool? arg_isCaptureEnabled = (args[1] as bool?); assert(arg_isCaptureEnabled != null, - 'Argument for dev.flutter.pigeon.FileChooserParamsFlutterApi.create was null, expected non-null bool.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.FileChooserParamsFlutterApi.create was null, expected non-null bool.'); final List? arg_acceptTypes = (args[2] as List?)?.cast(); assert(arg_acceptTypes != null, - 'Argument for dev.flutter.pigeon.FileChooserParamsFlutterApi.create was null, expected non-null List.'); - final FileChooserModeEnumData? arg_mode = - (args[3] as FileChooserModeEnumData?); + 'Argument for dev.flutter.pigeon.webview_flutter_android.FileChooserParamsFlutterApi.create was null, expected non-null List.'); + final FileChooserMode? arg_mode = + args[3] == null ? null : FileChooserMode.values[args[3]! as int]; assert(arg_mode != null, - 'Argument for dev.flutter.pigeon.FileChooserParamsFlutterApi.create was null, expected non-null FileChooserModeEnumData.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.FileChooserParamsFlutterApi.create was null, expected non-null FileChooserMode.'); final String? arg_filenameHint = (args[4] as String?); api.create(arg_instanceId!, arg_isCaptureEnabled!, arg_acceptTypes!, arg_mode!, arg_filenameHint); @@ -2274,7 +2283,8 @@ class PermissionRequestHostApi { /// Handles Dart method `PermissionRequest.grant`. Future grant(int arg_instanceId, List arg_resources) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.PermissionRequestHostApi.grant', codec, + 'dev.flutter.pigeon.webview_flutter_android.PermissionRequestHostApi.grant', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel .send([arg_instanceId, arg_resources]) as List?; @@ -2297,7 +2307,8 @@ class PermissionRequestHostApi { /// Handles Dart method `PermissionRequest.deny`. Future deny(int arg_instanceId) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.PermissionRequestHostApi.deny', codec, + 'dev.flutter.pigeon.webview_flutter_android.PermissionRequestHostApi.deny', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_instanceId]) as List?; @@ -2335,22 +2346,23 @@ abstract class PermissionRequestFlutterApi { {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.PermissionRequestFlutterApi.create', codec, + 'dev.flutter.pigeon.webview_flutter_android.PermissionRequestFlutterApi.create', + codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.PermissionRequestFlutterApi.create was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.PermissionRequestFlutterApi.create was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.PermissionRequestFlutterApi.create was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.PermissionRequestFlutterApi.create was null, expected non-null int.'); final List? arg_resources = (args[1] as List?)?.cast(); assert(arg_resources != null, - 'Argument for dev.flutter.pigeon.PermissionRequestFlutterApi.create was null, expected non-null List.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.PermissionRequestFlutterApi.create was null, expected non-null List.'); api.create(arg_instanceId!, arg_resources!); return; }); @@ -2380,7 +2392,7 @@ class GeolocationPermissionsCallbackHostApi { Future invoke(int arg_instanceId, String arg_origin, bool arg_allow, bool arg_retain) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.GeolocationPermissionsCallbackHostApi.invoke', + 'dev.flutter.pigeon.webview_flutter_android.GeolocationPermissionsCallbackHostApi.invoke', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel @@ -2420,7 +2432,7 @@ abstract class GeolocationPermissionsCallbackFlutterApi { {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.GeolocationPermissionsCallbackFlutterApi.create', + 'dev.flutter.pigeon.webview_flutter_android.GeolocationPermissionsCallbackFlutterApi.create', codec, binaryMessenger: binaryMessenger); if (api == null) { @@ -2428,11 +2440,11 @@ abstract class GeolocationPermissionsCallbackFlutterApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.GeolocationPermissionsCallbackFlutterApi.create was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.GeolocationPermissionsCallbackFlutterApi.create was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.GeolocationPermissionsCallbackFlutterApi.create was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.GeolocationPermissionsCallbackFlutterApi.create was null, expected non-null int.'); api.create(arg_instanceId!); return; }); diff --git a/packages/webview_flutter/webview_flutter_android/lib/src/android_webview_api_impls.dart b/packages/webview_flutter/webview_flutter_android/lib/src/android_webview_api_impls.dart index 74e116da5b90..a2fa1da3477e 100644 --- a/packages/webview_flutter/webview_flutter_android/lib/src/android_webview_api_impls.dart +++ b/packages/webview_flutter/webview_flutter_android/lib/src/android_webview_api_impls.dart @@ -1025,14 +1025,14 @@ class FileChooserParamsFlutterApiImpl extends FileChooserParamsFlutterApi { int instanceId, bool isCaptureEnabled, List acceptTypes, - FileChooserModeEnumData mode, + FileChooserMode mode, String? filenameHint, ) { instanceManager.addHostCreatedInstance( FileChooserParams.detached( isCaptureEnabled: isCaptureEnabled, acceptTypes: acceptTypes.cast(), - mode: mode.value, + mode: mode, filenameHint: filenameHint, binaryMessenger: binaryMessenger, instanceManager: instanceManager, diff --git a/packages/webview_flutter/webview_flutter_android/pigeons/android_webview.dart b/packages/webview_flutter/webview_flutter_android/pigeons/android_webview.dart index f75eb3235bde..0a43f89e5eac 100644 --- a/packages/webview_flutter/webview_flutter_android/pigeons/android_webview.dart +++ b/packages/webview_flutter/webview_flutter_android/pigeons/android_webview.dart @@ -57,12 +57,6 @@ enum FileChooserMode { save, } -// TODO(bparrishMines): Enums need be wrapped in a data class because thay can't -// be used as primitive arguments. See https://github.com/flutter/flutter/issues/87307 -class FileChooserModeEnumData { - late FileChooserMode value; -} - class WebResourceRequestData { WebResourceRequestData( this.url, @@ -393,7 +387,7 @@ abstract class FileChooserParamsFlutterApi { int instanceId, bool isCaptureEnabled, List acceptTypes, - FileChooserModeEnumData mode, + FileChooserMode mode, String? filenameHint, ); } diff --git a/packages/webview_flutter/webview_flutter_android/pubspec.yaml b/packages/webview_flutter/webview_flutter_android/pubspec.yaml index 7812116d81db..894448491c5a 100644 --- a/packages/webview_flutter/webview_flutter_android/pubspec.yaml +++ b/packages/webview_flutter/webview_flutter_android/pubspec.yaml @@ -2,7 +2,7 @@ name: webview_flutter_android description: A Flutter plugin that provides a WebView widget on Android. repository: https://github.com/flutter/packages/tree/main/packages/webview_flutter/webview_flutter_android issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+webview%22 -version: 3.9.4 +version: 3.9.5 environment: sdk: ">=2.19.0 <4.0.0" @@ -27,7 +27,7 @@ dev_dependencies: flutter_test: sdk: flutter mockito: 5.4.1 - pigeon: ^9.2.4 + pigeon: ^11.0.0 topics: - html diff --git a/packages/webview_flutter/webview_flutter_android/test/android_webview_test.dart b/packages/webview_flutter/webview_flutter_android/test/android_webview_test.dart index 995694fee029..194f1b17e587 100644 --- a/packages/webview_flutter/webview_flutter_android/test/android_webview_test.dart +++ b/packages/webview_flutter/webview_flutter_android/test/android_webview_test.dart @@ -1085,7 +1085,7 @@ void main() { 0, false, const ['my', 'list'], - FileChooserModeEnumData(value: FileChooserMode.openMultiple), + FileChooserMode.openMultiple, 'filenameHint', ); diff --git a/packages/webview_flutter/webview_flutter_android/test/test_android_webview.g.dart b/packages/webview_flutter/webview_flutter_android/test/test_android_webview.g.dart index 98060e042f9b..a018fccdcbe7 100644 --- a/packages/webview_flutter/webview_flutter_android/test/test_android_webview.g.dart +++ b/packages/webview_flutter/webview_flutter_android/test/test_android_webview.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v9.2.5), do not edit directly. +// Autogenerated from Pigeon (v11.0.1), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, unnecessary_import // ignore_for_file: avoid_relative_lib_imports @@ -28,7 +28,8 @@ abstract class TestInstanceManagerHostApi { {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.InstanceManagerHostApi.clear', codec, + 'dev.flutter.pigeon.webview_flutter_android.InstanceManagerHostApi.clear', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -62,7 +63,8 @@ abstract class TestJavaObjectHostApi { {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.JavaObjectHostApi.dispose', codec, + 'dev.flutter.pigeon.webview_flutter_android.JavaObjectHostApi.dispose', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -72,11 +74,11 @@ abstract class TestJavaObjectHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.JavaObjectHostApi.dispose was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.JavaObjectHostApi.dispose was null.'); final List args = (message as List?)!; final int? arg_identifier = (args[0] as int?); assert(arg_identifier != null, - 'Argument for dev.flutter.pigeon.JavaObjectHostApi.dispose was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.JavaObjectHostApi.dispose was null, expected non-null int.'); api.dispose(arg_identifier!); return []; }); @@ -112,7 +114,8 @@ abstract class TestCookieManagerHostApi { {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.CookieManagerHostApi.attachInstance', codec, + 'dev.flutter.pigeon.webview_flutter_android.CookieManagerHostApi.attachInstance', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -122,11 +125,11 @@ abstract class TestCookieManagerHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.CookieManagerHostApi.attachInstance was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.CookieManagerHostApi.attachInstance was null.'); final List args = (message as List?)!; final int? arg_instanceIdentifier = (args[0] as int?); assert(arg_instanceIdentifier != null, - 'Argument for dev.flutter.pigeon.CookieManagerHostApi.attachInstance was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.CookieManagerHostApi.attachInstance was null, expected non-null int.'); api.attachInstance(arg_instanceIdentifier!); return []; }); @@ -134,7 +137,8 @@ abstract class TestCookieManagerHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.CookieManagerHostApi.setCookie', codec, + 'dev.flutter.pigeon.webview_flutter_android.CookieManagerHostApi.setCookie', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -144,17 +148,17 @@ abstract class TestCookieManagerHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.CookieManagerHostApi.setCookie was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.CookieManagerHostApi.setCookie was null.'); final List args = (message as List?)!; final int? arg_identifier = (args[0] as int?); assert(arg_identifier != null, - 'Argument for dev.flutter.pigeon.CookieManagerHostApi.setCookie was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.CookieManagerHostApi.setCookie was null, expected non-null int.'); final String? arg_url = (args[1] as String?); assert(arg_url != null, - 'Argument for dev.flutter.pigeon.CookieManagerHostApi.setCookie was null, expected non-null String.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.CookieManagerHostApi.setCookie was null, expected non-null String.'); final String? arg_value = (args[2] as String?); assert(arg_value != null, - 'Argument for dev.flutter.pigeon.CookieManagerHostApi.setCookie was null, expected non-null String.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.CookieManagerHostApi.setCookie was null, expected non-null String.'); api.setCookie(arg_identifier!, arg_url!, arg_value!); return []; }); @@ -162,7 +166,8 @@ abstract class TestCookieManagerHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.CookieManagerHostApi.removeAllCookies', codec, + 'dev.flutter.pigeon.webview_flutter_android.CookieManagerHostApi.removeAllCookies', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -172,11 +177,11 @@ abstract class TestCookieManagerHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.CookieManagerHostApi.removeAllCookies was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.CookieManagerHostApi.removeAllCookies was null.'); final List args = (message as List?)!; final int? arg_identifier = (args[0] as int?); assert(arg_identifier != null, - 'Argument for dev.flutter.pigeon.CookieManagerHostApi.removeAllCookies was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.CookieManagerHostApi.removeAllCookies was null, expected non-null int.'); final bool output = await api.removeAllCookies(arg_identifier!); return [output]; }); @@ -184,7 +189,7 @@ abstract class TestCookieManagerHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.CookieManagerHostApi.setAcceptThirdPartyCookies', + 'dev.flutter.pigeon.webview_flutter_android.CookieManagerHostApi.setAcceptThirdPartyCookies', codec, binaryMessenger: binaryMessenger); if (api == null) { @@ -195,17 +200,17 @@ abstract class TestCookieManagerHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.CookieManagerHostApi.setAcceptThirdPartyCookies was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.CookieManagerHostApi.setAcceptThirdPartyCookies was null.'); final List args = (message as List?)!; final int? arg_identifier = (args[0] as int?); assert(arg_identifier != null, - 'Argument for dev.flutter.pigeon.CookieManagerHostApi.setAcceptThirdPartyCookies was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.CookieManagerHostApi.setAcceptThirdPartyCookies was null, expected non-null int.'); final int? arg_webViewIdentifier = (args[1] as int?); assert(arg_webViewIdentifier != null, - 'Argument for dev.flutter.pigeon.CookieManagerHostApi.setAcceptThirdPartyCookies was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.CookieManagerHostApi.setAcceptThirdPartyCookies was null, expected non-null int.'); final bool? arg_accept = (args[2] as bool?); assert(arg_accept != null, - 'Argument for dev.flutter.pigeon.CookieManagerHostApi.setAcceptThirdPartyCookies was null, expected non-null bool.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.CookieManagerHostApi.setAcceptThirdPartyCookies was null, expected non-null bool.'); api.setAcceptThirdPartyCookies( arg_identifier!, arg_webViewIdentifier!, arg_accept!); return []; @@ -217,7 +222,6 @@ abstract class TestCookieManagerHostApi { class _TestWebViewHostApiCodec extends StandardMessageCodec { const _TestWebViewHostApiCodec(); - @override void writeValue(WriteBuffer buffer, Object? value) { if (value is WebViewPoint) { @@ -302,7 +306,8 @@ abstract class TestWebViewHostApi { {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.create', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.create', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -312,11 +317,11 @@ abstract class TestWebViewHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.create was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.create was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.create was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.create was null, expected non-null int.'); api.create(arg_instanceId!); return []; }); @@ -324,7 +329,8 @@ abstract class TestWebViewHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.loadData', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.loadData', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -334,14 +340,14 @@ abstract class TestWebViewHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.loadData was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.loadData was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.loadData was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.loadData was null, expected non-null int.'); final String? arg_data = (args[1] as String?); assert(arg_data != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.loadData was null, expected non-null String.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.loadData was null, expected non-null String.'); final String? arg_mimeType = (args[2] as String?); final String? arg_encoding = (args[3] as String?); api.loadData(arg_instanceId!, arg_data!, arg_mimeType, arg_encoding); @@ -351,7 +357,8 @@ abstract class TestWebViewHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.loadDataWithBaseUrl', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.loadDataWithBaseUrl', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -361,15 +368,15 @@ abstract class TestWebViewHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.loadDataWithBaseUrl was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.loadDataWithBaseUrl was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.loadDataWithBaseUrl was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.loadDataWithBaseUrl was null, expected non-null int.'); final String? arg_baseUrl = (args[1] as String?); final String? arg_data = (args[2] as String?); assert(arg_data != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.loadDataWithBaseUrl was null, expected non-null String.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.loadDataWithBaseUrl was null, expected non-null String.'); final String? arg_mimeType = (args[3] as String?); final String? arg_encoding = (args[4] as String?); final String? arg_historyUrl = (args[5] as String?); @@ -381,7 +388,8 @@ abstract class TestWebViewHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.loadUrl', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.loadUrl', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -391,18 +399,18 @@ abstract class TestWebViewHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.loadUrl was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.loadUrl was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.loadUrl was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.loadUrl was null, expected non-null int.'); final String? arg_url = (args[1] as String?); assert(arg_url != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.loadUrl was null, expected non-null String.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.loadUrl was null, expected non-null String.'); final Map? arg_headers = (args[2] as Map?)?.cast(); assert(arg_headers != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.loadUrl was null, expected non-null Map.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.loadUrl was null, expected non-null Map.'); api.loadUrl(arg_instanceId!, arg_url!, arg_headers!); return []; }); @@ -410,7 +418,8 @@ abstract class TestWebViewHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.postUrl', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.postUrl', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -420,17 +429,17 @@ abstract class TestWebViewHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.postUrl was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.postUrl was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.postUrl was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.postUrl was null, expected non-null int.'); final String? arg_url = (args[1] as String?); assert(arg_url != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.postUrl was null, expected non-null String.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.postUrl was null, expected non-null String.'); final Uint8List? arg_data = (args[2] as Uint8List?); assert(arg_data != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.postUrl was null, expected non-null Uint8List.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.postUrl was null, expected non-null Uint8List.'); api.postUrl(arg_instanceId!, arg_url!, arg_data!); return []; }); @@ -438,7 +447,8 @@ abstract class TestWebViewHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.getUrl', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.getUrl', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -448,11 +458,11 @@ abstract class TestWebViewHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.getUrl was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.getUrl was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.getUrl was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.getUrl was null, expected non-null int.'); final String? output = api.getUrl(arg_instanceId!); return [output]; }); @@ -460,7 +470,8 @@ abstract class TestWebViewHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.canGoBack', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.canGoBack', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -470,11 +481,11 @@ abstract class TestWebViewHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.canGoBack was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.canGoBack was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.canGoBack was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.canGoBack was null, expected non-null int.'); final bool output = api.canGoBack(arg_instanceId!); return [output]; }); @@ -482,7 +493,8 @@ abstract class TestWebViewHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.canGoForward', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.canGoForward', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -492,11 +504,11 @@ abstract class TestWebViewHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.canGoForward was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.canGoForward was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.canGoForward was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.canGoForward was null, expected non-null int.'); final bool output = api.canGoForward(arg_instanceId!); return [output]; }); @@ -504,7 +516,8 @@ abstract class TestWebViewHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.goBack', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.goBack', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -514,11 +527,11 @@ abstract class TestWebViewHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.goBack was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.goBack was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.goBack was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.goBack was null, expected non-null int.'); api.goBack(arg_instanceId!); return []; }); @@ -526,7 +539,8 @@ abstract class TestWebViewHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.goForward', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.goForward', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -536,11 +550,11 @@ abstract class TestWebViewHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.goForward was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.goForward was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.goForward was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.goForward was null, expected non-null int.'); api.goForward(arg_instanceId!); return []; }); @@ -548,7 +562,8 @@ abstract class TestWebViewHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.reload', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.reload', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -558,11 +573,11 @@ abstract class TestWebViewHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.reload was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.reload was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.reload was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.reload was null, expected non-null int.'); api.reload(arg_instanceId!); return []; }); @@ -570,7 +585,8 @@ abstract class TestWebViewHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.clearCache', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.clearCache', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -580,14 +596,14 @@ abstract class TestWebViewHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.clearCache was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.clearCache was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.clearCache was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.clearCache was null, expected non-null int.'); final bool? arg_includeDiskFiles = (args[1] as bool?); assert(arg_includeDiskFiles != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.clearCache was null, expected non-null bool.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.clearCache was null, expected non-null bool.'); api.clearCache(arg_instanceId!, arg_includeDiskFiles!); return []; }); @@ -595,7 +611,8 @@ abstract class TestWebViewHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.evaluateJavascript', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.evaluateJavascript', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -605,14 +622,14 @@ abstract class TestWebViewHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.evaluateJavascript was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.evaluateJavascript was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.evaluateJavascript was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.evaluateJavascript was null, expected non-null int.'); final String? arg_javascriptString = (args[1] as String?); assert(arg_javascriptString != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.evaluateJavascript was null, expected non-null String.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.evaluateJavascript was null, expected non-null String.'); final String? output = await api.evaluateJavascript( arg_instanceId!, arg_javascriptString!); return [output]; @@ -621,7 +638,8 @@ abstract class TestWebViewHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.getTitle', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.getTitle', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -631,11 +649,11 @@ abstract class TestWebViewHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.getTitle was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.getTitle was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.getTitle was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.getTitle was null, expected non-null int.'); final String? output = api.getTitle(arg_instanceId!); return [output]; }); @@ -643,7 +661,8 @@ abstract class TestWebViewHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.scrollTo', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.scrollTo', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -653,17 +672,17 @@ abstract class TestWebViewHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.scrollTo was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.scrollTo was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.scrollTo was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.scrollTo was null, expected non-null int.'); final int? arg_x = (args[1] as int?); assert(arg_x != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.scrollTo was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.scrollTo was null, expected non-null int.'); final int? arg_y = (args[2] as int?); assert(arg_y != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.scrollTo was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.scrollTo was null, expected non-null int.'); api.scrollTo(arg_instanceId!, arg_x!, arg_y!); return []; }); @@ -671,7 +690,8 @@ abstract class TestWebViewHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.scrollBy', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.scrollBy', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -681,17 +701,17 @@ abstract class TestWebViewHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.scrollBy was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.scrollBy was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.scrollBy was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.scrollBy was null, expected non-null int.'); final int? arg_x = (args[1] as int?); assert(arg_x != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.scrollBy was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.scrollBy was null, expected non-null int.'); final int? arg_y = (args[2] as int?); assert(arg_y != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.scrollBy was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.scrollBy was null, expected non-null int.'); api.scrollBy(arg_instanceId!, arg_x!, arg_y!); return []; }); @@ -699,7 +719,8 @@ abstract class TestWebViewHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.getScrollX', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.getScrollX', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -709,11 +730,11 @@ abstract class TestWebViewHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.getScrollX was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.getScrollX was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.getScrollX was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.getScrollX was null, expected non-null int.'); final int output = api.getScrollX(arg_instanceId!); return [output]; }); @@ -721,7 +742,8 @@ abstract class TestWebViewHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.getScrollY', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.getScrollY', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -731,11 +753,11 @@ abstract class TestWebViewHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.getScrollY was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.getScrollY was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.getScrollY was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.getScrollY was null, expected non-null int.'); final int output = api.getScrollY(arg_instanceId!); return [output]; }); @@ -743,7 +765,8 @@ abstract class TestWebViewHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.getScrollPosition', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.getScrollPosition', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -753,11 +776,11 @@ abstract class TestWebViewHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.getScrollPosition was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.getScrollPosition was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.getScrollPosition was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.getScrollPosition was null, expected non-null int.'); final WebViewPoint output = api.getScrollPosition(arg_instanceId!); return [output]; }); @@ -765,7 +788,7 @@ abstract class TestWebViewHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.setWebContentsDebuggingEnabled', + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.setWebContentsDebuggingEnabled', codec, binaryMessenger: binaryMessenger); if (api == null) { @@ -776,11 +799,11 @@ abstract class TestWebViewHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.setWebContentsDebuggingEnabled was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.setWebContentsDebuggingEnabled was null.'); final List args = (message as List?)!; final bool? arg_enabled = (args[0] as bool?); assert(arg_enabled != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.setWebContentsDebuggingEnabled was null, expected non-null bool.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.setWebContentsDebuggingEnabled was null, expected non-null bool.'); api.setWebContentsDebuggingEnabled(arg_enabled!); return []; }); @@ -788,7 +811,8 @@ abstract class TestWebViewHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.setWebViewClient', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.setWebViewClient', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -798,14 +822,14 @@ abstract class TestWebViewHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.setWebViewClient was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.setWebViewClient was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.setWebViewClient was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.setWebViewClient was null, expected non-null int.'); final int? arg_webViewClientInstanceId = (args[1] as int?); assert(arg_webViewClientInstanceId != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.setWebViewClient was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.setWebViewClient was null, expected non-null int.'); api.setWebViewClient(arg_instanceId!, arg_webViewClientInstanceId!); return []; }); @@ -813,7 +837,8 @@ abstract class TestWebViewHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.addJavaScriptChannel', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.addJavaScriptChannel', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -823,14 +848,14 @@ abstract class TestWebViewHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.addJavaScriptChannel was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.addJavaScriptChannel was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.addJavaScriptChannel was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.addJavaScriptChannel was null, expected non-null int.'); final int? arg_javaScriptChannelInstanceId = (args[1] as int?); assert(arg_javaScriptChannelInstanceId != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.addJavaScriptChannel was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.addJavaScriptChannel was null, expected non-null int.'); api.addJavaScriptChannel( arg_instanceId!, arg_javaScriptChannelInstanceId!); return []; @@ -839,7 +864,8 @@ abstract class TestWebViewHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.removeJavaScriptChannel', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.removeJavaScriptChannel', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -849,14 +875,14 @@ abstract class TestWebViewHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.removeJavaScriptChannel was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.removeJavaScriptChannel was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.removeJavaScriptChannel was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.removeJavaScriptChannel was null, expected non-null int.'); final int? arg_javaScriptChannelInstanceId = (args[1] as int?); assert(arg_javaScriptChannelInstanceId != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.removeJavaScriptChannel was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.removeJavaScriptChannel was null, expected non-null int.'); api.removeJavaScriptChannel( arg_instanceId!, arg_javaScriptChannelInstanceId!); return []; @@ -865,7 +891,8 @@ abstract class TestWebViewHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.setDownloadListener', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.setDownloadListener', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -875,11 +902,11 @@ abstract class TestWebViewHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.setDownloadListener was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.setDownloadListener was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.setDownloadListener was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.setDownloadListener was null, expected non-null int.'); final int? arg_listenerInstanceId = (args[1] as int?); api.setDownloadListener(arg_instanceId!, arg_listenerInstanceId); return []; @@ -888,7 +915,8 @@ abstract class TestWebViewHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.setWebChromeClient', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.setWebChromeClient', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -898,11 +926,11 @@ abstract class TestWebViewHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.setWebChromeClient was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.setWebChromeClient was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.setWebChromeClient was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.setWebChromeClient was null, expected non-null int.'); final int? arg_clientInstanceId = (args[1] as int?); api.setWebChromeClient(arg_instanceId!, arg_clientInstanceId); return []; @@ -911,7 +939,8 @@ abstract class TestWebViewHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewHostApi.setBackgroundColor', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.setBackgroundColor', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -921,14 +950,14 @@ abstract class TestWebViewHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.setBackgroundColor was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.setBackgroundColor was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.setBackgroundColor was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.setBackgroundColor was null, expected non-null int.'); final int? arg_color = (args[1] as int?); assert(arg_color != null, - 'Argument for dev.flutter.pigeon.WebViewHostApi.setBackgroundColor was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewHostApi.setBackgroundColor was null, expected non-null int.'); api.setBackgroundColor(arg_instanceId!, arg_color!); return []; }); @@ -974,7 +1003,8 @@ abstract class TestWebSettingsHostApi { {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebSettingsHostApi.create', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.create', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -984,14 +1014,14 @@ abstract class TestWebSettingsHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.create was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.create was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.create was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.create was null, expected non-null int.'); final int? arg_webViewInstanceId = (args[1] as int?); assert(arg_webViewInstanceId != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.create was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.create was null, expected non-null int.'); api.create(arg_instanceId!, arg_webViewInstanceId!); return []; }); @@ -999,7 +1029,8 @@ abstract class TestWebSettingsHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebSettingsHostApi.setDomStorageEnabled', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setDomStorageEnabled', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -1009,14 +1040,14 @@ abstract class TestWebSettingsHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.setDomStorageEnabled was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setDomStorageEnabled was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.setDomStorageEnabled was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setDomStorageEnabled was null, expected non-null int.'); final bool? arg_flag = (args[1] as bool?); assert(arg_flag != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.setDomStorageEnabled was null, expected non-null bool.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setDomStorageEnabled was null, expected non-null bool.'); api.setDomStorageEnabled(arg_instanceId!, arg_flag!); return []; }); @@ -1024,7 +1055,7 @@ abstract class TestWebSettingsHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebSettingsHostApi.setJavaScriptCanOpenWindowsAutomatically', + 'dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setJavaScriptCanOpenWindowsAutomatically', codec, binaryMessenger: binaryMessenger); if (api == null) { @@ -1035,14 +1066,14 @@ abstract class TestWebSettingsHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.setJavaScriptCanOpenWindowsAutomatically was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setJavaScriptCanOpenWindowsAutomatically was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.setJavaScriptCanOpenWindowsAutomatically was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setJavaScriptCanOpenWindowsAutomatically was null, expected non-null int.'); final bool? arg_flag = (args[1] as bool?); assert(arg_flag != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.setJavaScriptCanOpenWindowsAutomatically was null, expected non-null bool.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setJavaScriptCanOpenWindowsAutomatically was null, expected non-null bool.'); api.setJavaScriptCanOpenWindowsAutomatically( arg_instanceId!, arg_flag!); return []; @@ -1051,7 +1082,7 @@ abstract class TestWebSettingsHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebSettingsHostApi.setSupportMultipleWindows', + 'dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setSupportMultipleWindows', codec, binaryMessenger: binaryMessenger); if (api == null) { @@ -1062,14 +1093,14 @@ abstract class TestWebSettingsHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.setSupportMultipleWindows was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setSupportMultipleWindows was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.setSupportMultipleWindows was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setSupportMultipleWindows was null, expected non-null int.'); final bool? arg_support = (args[1] as bool?); assert(arg_support != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.setSupportMultipleWindows was null, expected non-null bool.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setSupportMultipleWindows was null, expected non-null bool.'); api.setSupportMultipleWindows(arg_instanceId!, arg_support!); return []; }); @@ -1077,7 +1108,8 @@ abstract class TestWebSettingsHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebSettingsHostApi.setJavaScriptEnabled', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setJavaScriptEnabled', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -1087,14 +1119,14 @@ abstract class TestWebSettingsHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.setJavaScriptEnabled was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setJavaScriptEnabled was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.setJavaScriptEnabled was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setJavaScriptEnabled was null, expected non-null int.'); final bool? arg_flag = (args[1] as bool?); assert(arg_flag != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.setJavaScriptEnabled was null, expected non-null bool.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setJavaScriptEnabled was null, expected non-null bool.'); api.setJavaScriptEnabled(arg_instanceId!, arg_flag!); return []; }); @@ -1102,7 +1134,8 @@ abstract class TestWebSettingsHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebSettingsHostApi.setUserAgentString', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setUserAgentString', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -1112,11 +1145,11 @@ abstract class TestWebSettingsHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.setUserAgentString was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setUserAgentString was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.setUserAgentString was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setUserAgentString was null, expected non-null int.'); final String? arg_userAgentString = (args[1] as String?); api.setUserAgentString(arg_instanceId!, arg_userAgentString); return []; @@ -1125,7 +1158,7 @@ abstract class TestWebSettingsHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebSettingsHostApi.setMediaPlaybackRequiresUserGesture', + 'dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setMediaPlaybackRequiresUserGesture', codec, binaryMessenger: binaryMessenger); if (api == null) { @@ -1136,14 +1169,14 @@ abstract class TestWebSettingsHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.setMediaPlaybackRequiresUserGesture was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setMediaPlaybackRequiresUserGesture was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.setMediaPlaybackRequiresUserGesture was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setMediaPlaybackRequiresUserGesture was null, expected non-null int.'); final bool? arg_require = (args[1] as bool?); assert(arg_require != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.setMediaPlaybackRequiresUserGesture was null, expected non-null bool.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setMediaPlaybackRequiresUserGesture was null, expected non-null bool.'); api.setMediaPlaybackRequiresUserGesture( arg_instanceId!, arg_require!); return []; @@ -1152,7 +1185,8 @@ abstract class TestWebSettingsHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebSettingsHostApi.setSupportZoom', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setSupportZoom', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -1162,14 +1196,14 @@ abstract class TestWebSettingsHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.setSupportZoom was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setSupportZoom was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.setSupportZoom was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setSupportZoom was null, expected non-null int.'); final bool? arg_support = (args[1] as bool?); assert(arg_support != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.setSupportZoom was null, expected non-null bool.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setSupportZoom was null, expected non-null bool.'); api.setSupportZoom(arg_instanceId!, arg_support!); return []; }); @@ -1177,7 +1211,7 @@ abstract class TestWebSettingsHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebSettingsHostApi.setLoadWithOverviewMode', + 'dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setLoadWithOverviewMode', codec, binaryMessenger: binaryMessenger); if (api == null) { @@ -1188,14 +1222,14 @@ abstract class TestWebSettingsHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.setLoadWithOverviewMode was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setLoadWithOverviewMode was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.setLoadWithOverviewMode was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setLoadWithOverviewMode was null, expected non-null int.'); final bool? arg_overview = (args[1] as bool?); assert(arg_overview != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.setLoadWithOverviewMode was null, expected non-null bool.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setLoadWithOverviewMode was null, expected non-null bool.'); api.setLoadWithOverviewMode(arg_instanceId!, arg_overview!); return []; }); @@ -1203,7 +1237,8 @@ abstract class TestWebSettingsHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebSettingsHostApi.setUseWideViewPort', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setUseWideViewPort', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -1213,14 +1248,14 @@ abstract class TestWebSettingsHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.setUseWideViewPort was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setUseWideViewPort was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.setUseWideViewPort was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setUseWideViewPort was null, expected non-null int.'); final bool? arg_use = (args[1] as bool?); assert(arg_use != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.setUseWideViewPort was null, expected non-null bool.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setUseWideViewPort was null, expected non-null bool.'); api.setUseWideViewPort(arg_instanceId!, arg_use!); return []; }); @@ -1228,7 +1263,8 @@ abstract class TestWebSettingsHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebSettingsHostApi.setDisplayZoomControls', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setDisplayZoomControls', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -1238,14 +1274,14 @@ abstract class TestWebSettingsHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.setDisplayZoomControls was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setDisplayZoomControls was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.setDisplayZoomControls was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setDisplayZoomControls was null, expected non-null int.'); final bool? arg_enabled = (args[1] as bool?); assert(arg_enabled != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.setDisplayZoomControls was null, expected non-null bool.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setDisplayZoomControls was null, expected non-null bool.'); api.setDisplayZoomControls(arg_instanceId!, arg_enabled!); return []; }); @@ -1253,7 +1289,8 @@ abstract class TestWebSettingsHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebSettingsHostApi.setBuiltInZoomControls', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setBuiltInZoomControls', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -1263,14 +1300,14 @@ abstract class TestWebSettingsHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.setBuiltInZoomControls was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setBuiltInZoomControls was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.setBuiltInZoomControls was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setBuiltInZoomControls was null, expected non-null int.'); final bool? arg_enabled = (args[1] as bool?); assert(arg_enabled != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.setBuiltInZoomControls was null, expected non-null bool.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setBuiltInZoomControls was null, expected non-null bool.'); api.setBuiltInZoomControls(arg_instanceId!, arg_enabled!); return []; }); @@ -1278,7 +1315,8 @@ abstract class TestWebSettingsHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebSettingsHostApi.setAllowFileAccess', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setAllowFileAccess', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -1288,14 +1326,14 @@ abstract class TestWebSettingsHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.setAllowFileAccess was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setAllowFileAccess was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.setAllowFileAccess was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setAllowFileAccess was null, expected non-null int.'); final bool? arg_enabled = (args[1] as bool?); assert(arg_enabled != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.setAllowFileAccess was null, expected non-null bool.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setAllowFileAccess was null, expected non-null bool.'); api.setAllowFileAccess(arg_instanceId!, arg_enabled!); return []; }); @@ -1303,7 +1341,8 @@ abstract class TestWebSettingsHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebSettingsHostApi.setTextZoom', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setTextZoom', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -1313,14 +1352,14 @@ abstract class TestWebSettingsHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.setTextZoom was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setTextZoom was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.setTextZoom was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setTextZoom was null, expected non-null int.'); final int? arg_textZoom = (args[1] as int?); assert(arg_textZoom != null, - 'Argument for dev.flutter.pigeon.WebSettingsHostApi.setTextZoom was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebSettingsHostApi.setTextZoom was null, expected non-null int.'); api.setTextZoom(arg_instanceId!, arg_textZoom!); return []; }); @@ -1340,7 +1379,8 @@ abstract class TestJavaScriptChannelHostApi { {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.JavaScriptChannelHostApi.create', codec, + 'dev.flutter.pigeon.webview_flutter_android.JavaScriptChannelHostApi.create', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -1350,14 +1390,14 @@ abstract class TestJavaScriptChannelHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.JavaScriptChannelHostApi.create was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.JavaScriptChannelHostApi.create was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.JavaScriptChannelHostApi.create was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.JavaScriptChannelHostApi.create was null, expected non-null int.'); final String? arg_channelName = (args[1] as String?); assert(arg_channelName != null, - 'Argument for dev.flutter.pigeon.JavaScriptChannelHostApi.create was null, expected non-null String.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.JavaScriptChannelHostApi.create was null, expected non-null String.'); api.create(arg_instanceId!, arg_channelName!); return []; }); @@ -1380,7 +1420,8 @@ abstract class TestWebViewClientHostApi { {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewClientHostApi.create', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebViewClientHostApi.create', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -1390,11 +1431,11 @@ abstract class TestWebViewClientHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebViewClientHostApi.create was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewClientHostApi.create was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebViewClientHostApi.create was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewClientHostApi.create was null, expected non-null int.'); api.create(arg_instanceId!); return []; }); @@ -1402,7 +1443,7 @@ abstract class TestWebViewClientHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebViewClientHostApi.setSynchronousReturnValueForShouldOverrideUrlLoading', + 'dev.flutter.pigeon.webview_flutter_android.WebViewClientHostApi.setSynchronousReturnValueForShouldOverrideUrlLoading', codec, binaryMessenger: binaryMessenger); if (api == null) { @@ -1413,14 +1454,14 @@ abstract class TestWebViewClientHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebViewClientHostApi.setSynchronousReturnValueForShouldOverrideUrlLoading was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewClientHostApi.setSynchronousReturnValueForShouldOverrideUrlLoading was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebViewClientHostApi.setSynchronousReturnValueForShouldOverrideUrlLoading was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewClientHostApi.setSynchronousReturnValueForShouldOverrideUrlLoading was null, expected non-null int.'); final bool? arg_value = (args[1] as bool?); assert(arg_value != null, - 'Argument for dev.flutter.pigeon.WebViewClientHostApi.setSynchronousReturnValueForShouldOverrideUrlLoading was null, expected non-null bool.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebViewClientHostApi.setSynchronousReturnValueForShouldOverrideUrlLoading was null, expected non-null bool.'); api.setSynchronousReturnValueForShouldOverrideUrlLoading( arg_instanceId!, arg_value!); return []; @@ -1441,7 +1482,8 @@ abstract class TestDownloadListenerHostApi { {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.DownloadListenerHostApi.create', codec, + 'dev.flutter.pigeon.webview_flutter_android.DownloadListenerHostApi.create', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -1451,11 +1493,11 @@ abstract class TestDownloadListenerHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.DownloadListenerHostApi.create was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.DownloadListenerHostApi.create was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.DownloadListenerHostApi.create was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.DownloadListenerHostApi.create was null, expected non-null int.'); api.create(arg_instanceId!); return []; }); @@ -1478,7 +1520,8 @@ abstract class TestWebChromeClientHostApi { {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebChromeClientHostApi.create', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebChromeClientHostApi.create', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -1488,11 +1531,11 @@ abstract class TestWebChromeClientHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebChromeClientHostApi.create was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebChromeClientHostApi.create was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebChromeClientHostApi.create was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebChromeClientHostApi.create was null, expected non-null int.'); api.create(arg_instanceId!); return []; }); @@ -1500,7 +1543,7 @@ abstract class TestWebChromeClientHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebChromeClientHostApi.setSynchronousReturnValueForOnShowFileChooser', + 'dev.flutter.pigeon.webview_flutter_android.WebChromeClientHostApi.setSynchronousReturnValueForOnShowFileChooser', codec, binaryMessenger: binaryMessenger); if (api == null) { @@ -1511,14 +1554,14 @@ abstract class TestWebChromeClientHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebChromeClientHostApi.setSynchronousReturnValueForOnShowFileChooser was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebChromeClientHostApi.setSynchronousReturnValueForOnShowFileChooser was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebChromeClientHostApi.setSynchronousReturnValueForOnShowFileChooser was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebChromeClientHostApi.setSynchronousReturnValueForOnShowFileChooser was null, expected non-null int.'); final bool? arg_value = (args[1] as bool?); assert(arg_value != null, - 'Argument for dev.flutter.pigeon.WebChromeClientHostApi.setSynchronousReturnValueForOnShowFileChooser was null, expected non-null bool.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebChromeClientHostApi.setSynchronousReturnValueForOnShowFileChooser was null, expected non-null bool.'); api.setSynchronousReturnValueForOnShowFileChooser( arg_instanceId!, arg_value!); return []; @@ -1541,7 +1584,8 @@ abstract class TestAssetManagerHostApi { {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.FlutterAssetManagerHostApi.list', codec, + 'dev.flutter.pigeon.webview_flutter_android.FlutterAssetManagerHostApi.list', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -1551,11 +1595,11 @@ abstract class TestAssetManagerHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterAssetManagerHostApi.list was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.FlutterAssetManagerHostApi.list was null.'); final List args = (message as List?)!; final String? arg_path = (args[0] as String?); assert(arg_path != null, - 'Argument for dev.flutter.pigeon.FlutterAssetManagerHostApi.list was null, expected non-null String.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.FlutterAssetManagerHostApi.list was null, expected non-null String.'); final List output = api.list(arg_path!); return [output]; }); @@ -1563,7 +1607,7 @@ abstract class TestAssetManagerHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.FlutterAssetManagerHostApi.getAssetFilePathByName', + 'dev.flutter.pigeon.webview_flutter_android.FlutterAssetManagerHostApi.getAssetFilePathByName', codec, binaryMessenger: binaryMessenger); if (api == null) { @@ -1574,11 +1618,11 @@ abstract class TestAssetManagerHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterAssetManagerHostApi.getAssetFilePathByName was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.FlutterAssetManagerHostApi.getAssetFilePathByName was null.'); final List args = (message as List?)!; final String? arg_name = (args[0] as String?); assert(arg_name != null, - 'Argument for dev.flutter.pigeon.FlutterAssetManagerHostApi.getAssetFilePathByName was null, expected non-null String.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.FlutterAssetManagerHostApi.getAssetFilePathByName was null, expected non-null String.'); final String output = api.getAssetFilePathByName(arg_name!); return [output]; }); @@ -1600,7 +1644,8 @@ abstract class TestWebStorageHostApi { {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebStorageHostApi.create', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebStorageHostApi.create', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -1610,11 +1655,11 @@ abstract class TestWebStorageHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebStorageHostApi.create was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebStorageHostApi.create was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebStorageHostApi.create was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebStorageHostApi.create was null, expected non-null int.'); api.create(arg_instanceId!); return []; }); @@ -1622,7 +1667,8 @@ abstract class TestWebStorageHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.WebStorageHostApi.deleteAllData', codec, + 'dev.flutter.pigeon.webview_flutter_android.WebStorageHostApi.deleteAllData', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -1632,11 +1678,11 @@ abstract class TestWebStorageHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.WebStorageHostApi.deleteAllData was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebStorageHostApi.deleteAllData was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.WebStorageHostApi.deleteAllData was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.WebStorageHostApi.deleteAllData was null, expected non-null int.'); api.deleteAllData(arg_instanceId!); return []; }); @@ -1667,7 +1713,8 @@ abstract class TestPermissionRequestHostApi { {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.PermissionRequestHostApi.grant', codec, + 'dev.flutter.pigeon.webview_flutter_android.PermissionRequestHostApi.grant', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -1677,15 +1724,15 @@ abstract class TestPermissionRequestHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.PermissionRequestHostApi.grant was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.PermissionRequestHostApi.grant was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.PermissionRequestHostApi.grant was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.PermissionRequestHostApi.grant was null, expected non-null int.'); final List? arg_resources = (args[1] as List?)?.cast(); assert(arg_resources != null, - 'Argument for dev.flutter.pigeon.PermissionRequestHostApi.grant was null, expected non-null List.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.PermissionRequestHostApi.grant was null, expected non-null List.'); api.grant(arg_instanceId!, arg_resources!); return []; }); @@ -1693,7 +1740,8 @@ abstract class TestPermissionRequestHostApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.PermissionRequestHostApi.deny', codec, + 'dev.flutter.pigeon.webview_flutter_android.PermissionRequestHostApi.deny', + codec, binaryMessenger: binaryMessenger); if (api == null) { _testBinaryMessengerBinding!.defaultBinaryMessenger @@ -1703,11 +1751,11 @@ abstract class TestPermissionRequestHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.PermissionRequestHostApi.deny was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.PermissionRequestHostApi.deny was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.PermissionRequestHostApi.deny was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.PermissionRequestHostApi.deny was null, expected non-null int.'); api.deny(arg_instanceId!); return []; }); @@ -1735,7 +1783,7 @@ abstract class TestGeolocationPermissionsCallbackHostApi { {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.GeolocationPermissionsCallbackHostApi.invoke', + 'dev.flutter.pigeon.webview_flutter_android.GeolocationPermissionsCallbackHostApi.invoke', codec, binaryMessenger: binaryMessenger); if (api == null) { @@ -1746,20 +1794,20 @@ abstract class TestGeolocationPermissionsCallbackHostApi { .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.GeolocationPermissionsCallbackHostApi.invoke was null.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.GeolocationPermissionsCallbackHostApi.invoke was null.'); final List args = (message as List?)!; final int? arg_instanceId = (args[0] as int?); assert(arg_instanceId != null, - 'Argument for dev.flutter.pigeon.GeolocationPermissionsCallbackHostApi.invoke was null, expected non-null int.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.GeolocationPermissionsCallbackHostApi.invoke was null, expected non-null int.'); final String? arg_origin = (args[1] as String?); assert(arg_origin != null, - 'Argument for dev.flutter.pigeon.GeolocationPermissionsCallbackHostApi.invoke was null, expected non-null String.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.GeolocationPermissionsCallbackHostApi.invoke was null, expected non-null String.'); final bool? arg_allow = (args[2] as bool?); assert(arg_allow != null, - 'Argument for dev.flutter.pigeon.GeolocationPermissionsCallbackHostApi.invoke was null, expected non-null bool.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.GeolocationPermissionsCallbackHostApi.invoke was null, expected non-null bool.'); final bool? arg_retain = (args[3] as bool?); assert(arg_retain != null, - 'Argument for dev.flutter.pigeon.GeolocationPermissionsCallbackHostApi.invoke was null, expected non-null bool.'); + 'Argument for dev.flutter.pigeon.webview_flutter_android.GeolocationPermissionsCallbackHostApi.invoke was null, expected non-null bool.'); api.invoke(arg_instanceId!, arg_origin!, arg_allow!, arg_retain!); return []; }); diff --git a/packages/webview_flutter/webview_flutter_wkwebview/CHANGELOG.md b/packages/webview_flutter/webview_flutter_wkwebview/CHANGELOG.md index 384b16b06536..43982617dc89 100644 --- a/packages/webview_flutter/webview_flutter_wkwebview/CHANGELOG.md +++ b/packages/webview_flutter/webview_flutter_wkwebview/CHANGELOG.md @@ -1,3 +1,7 @@ +## 3.7.5 + +* Updates pigeon to 11 and removes unneeded enum wrappers. + ## 3.7.4 * Adds pub topics to package metadata. diff --git a/packages/webview_flutter/webview_flutter_wkwebview/ios/Classes/FWFGeneratedWebKitApis.h b/packages/webview_flutter/webview_flutter_wkwebview/ios/Classes/FWFGeneratedWebKitApis.h index 5158dcd9689c..9faf81bbf2a2 100644 --- a/packages/webview_flutter/webview_flutter_wkwebview/ios/Classes/FWFGeneratedWebKitApis.h +++ b/packages/webview_flutter/webview_flutter_wkwebview/ios/Classes/FWFGeneratedWebKitApis.h @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v10.1.4), do not edit directly. +// Autogenerated from Pigeon (v11.0.1), do not edit directly. // See also: https://pub.dev/packages/pigeon #import @@ -24,6 +24,12 @@ typedef NS_ENUM(NSUInteger, FWFNSKeyValueObservingOptionsEnum) { FWFNSKeyValueObservingOptionsEnumPriorNotification = 3, }; +/// Wrapper for FWFNSKeyValueObservingOptionsEnum to allow for nullability. +@interface FWFNSKeyValueObservingOptionsEnumBox : NSObject +@property(nonatomic, assign) FWFNSKeyValueObservingOptionsEnum value; +- (instancetype)initWithValue:(FWFNSKeyValueObservingOptionsEnum)value; +@end + /// Mirror of NSKeyValueChange. /// /// See https://developer.apple.com/documentation/foundation/nskeyvaluechange?language=objc. @@ -34,6 +40,12 @@ typedef NS_ENUM(NSUInteger, FWFNSKeyValueChangeEnum) { FWFNSKeyValueChangeEnumReplacement = 3, }; +/// Wrapper for FWFNSKeyValueChangeEnum to allow for nullability. +@interface FWFNSKeyValueChangeEnumBox : NSObject +@property(nonatomic, assign) FWFNSKeyValueChangeEnum value; +- (instancetype)initWithValue:(FWFNSKeyValueChangeEnum)value; +@end + /// Mirror of NSKeyValueChangeKey. /// /// See https://developer.apple.com/documentation/foundation/nskeyvaluechangekey?language=objc. @@ -46,6 +58,12 @@ typedef NS_ENUM(NSUInteger, FWFNSKeyValueChangeKeyEnum) { FWFNSKeyValueChangeKeyEnumUnknown = 5, }; +/// Wrapper for FWFNSKeyValueChangeKeyEnum to allow for nullability. +@interface FWFNSKeyValueChangeKeyEnumBox : NSObject +@property(nonatomic, assign) FWFNSKeyValueChangeKeyEnum value; +- (instancetype)initWithValue:(FWFNSKeyValueChangeKeyEnum)value; +@end + /// Mirror of WKUserScriptInjectionTime. /// /// See https://developer.apple.com/documentation/webkit/wkuserscriptinjectiontime?language=objc. @@ -54,6 +72,12 @@ typedef NS_ENUM(NSUInteger, FWFWKUserScriptInjectionTimeEnum) { FWFWKUserScriptInjectionTimeEnumAtDocumentEnd = 1, }; +/// Wrapper for FWFWKUserScriptInjectionTimeEnum to allow for nullability. +@interface FWFWKUserScriptInjectionTimeEnumBox : NSObject +@property(nonatomic, assign) FWFWKUserScriptInjectionTimeEnum value; +- (instancetype)initWithValue:(FWFWKUserScriptInjectionTimeEnum)value; +@end + /// Mirror of WKAudiovisualMediaTypes. /// /// See @@ -65,6 +89,12 @@ typedef NS_ENUM(NSUInteger, FWFWKAudiovisualMediaTypeEnum) { FWFWKAudiovisualMediaTypeEnumAll = 3, }; +/// Wrapper for FWFWKAudiovisualMediaTypeEnum to allow for nullability. +@interface FWFWKAudiovisualMediaTypeEnumBox : NSObject +@property(nonatomic, assign) FWFWKAudiovisualMediaTypeEnum value; +- (instancetype)initWithValue:(FWFWKAudiovisualMediaTypeEnum)value; +@end + /// Mirror of WKWebsiteDataTypes. /// /// See @@ -80,6 +110,12 @@ typedef NS_ENUM(NSUInteger, FWFWKWebsiteDataTypeEnum) { FWFWKWebsiteDataTypeEnumIndexedDBDatabases = 7, }; +/// Wrapper for FWFWKWebsiteDataTypeEnum to allow for nullability. +@interface FWFWKWebsiteDataTypeEnumBox : NSObject +@property(nonatomic, assign) FWFWKWebsiteDataTypeEnum value; +- (instancetype)initWithValue:(FWFWKWebsiteDataTypeEnum)value; +@end + /// Mirror of WKNavigationActionPolicy. /// /// See https://developer.apple.com/documentation/webkit/wknavigationactionpolicy?language=objc. @@ -88,6 +124,12 @@ typedef NS_ENUM(NSUInteger, FWFWKNavigationActionPolicyEnum) { FWFWKNavigationActionPolicyEnumCancel = 1, }; +/// Wrapper for FWFWKNavigationActionPolicyEnum to allow for nullability. +@interface FWFWKNavigationActionPolicyEnumBox : NSObject +@property(nonatomic, assign) FWFWKNavigationActionPolicyEnum value; +- (instancetype)initWithValue:(FWFWKNavigationActionPolicyEnum)value; +@end + /// Mirror of NSHTTPCookiePropertyKey. /// /// See https://developer.apple.com/documentation/foundation/nshttpcookiepropertykey. @@ -108,6 +150,12 @@ typedef NS_ENUM(NSUInteger, FWFNSHttpCookiePropertyKeyEnum) { FWFNSHttpCookiePropertyKeyEnumVersion = 13, }; +/// Wrapper for FWFNSHttpCookiePropertyKeyEnum to allow for nullability. +@interface FWFNSHttpCookiePropertyKeyEnumBox : NSObject +@property(nonatomic, assign) FWFNSHttpCookiePropertyKeyEnum value; +- (instancetype)initWithValue:(FWFNSHttpCookiePropertyKeyEnum)value; +@end + /// An object that contains information about an action that causes navigation /// to occur. /// @@ -151,6 +199,12 @@ typedef NS_ENUM(NSUInteger, FWFWKNavigationType) { FWFWKNavigationTypeUnknown = 6, }; +/// Wrapper for FWFWKNavigationType to allow for nullability. +@interface FWFWKNavigationTypeBox : NSObject +@property(nonatomic, assign) FWFWKNavigationType value; +- (instancetype)initWithValue:(FWFWKNavigationType)value; +@end + /// Possible permission decisions for device resource access. /// /// See https://developer.apple.com/documentation/webkit/wkpermissiondecision?language=objc. @@ -172,6 +226,12 @@ typedef NS_ENUM(NSUInteger, FWFWKPermissionDecision) { FWFWKPermissionDecisionPrompt = 2, }; +/// Wrapper for FWFWKPermissionDecision to allow for nullability. +@interface FWFWKPermissionDecisionBox : NSObject +@property(nonatomic, assign) FWFWKPermissionDecision value; +- (instancetype)initWithValue:(FWFWKPermissionDecision)value; +@end + /// List of the types of media devices that can capture audio, video, or both. /// /// See https://developer.apple.com/documentation/webkit/wkmediacapturetype?language=objc. @@ -198,15 +258,17 @@ typedef NS_ENUM(NSUInteger, FWFWKMediaCaptureType) { FWFWKMediaCaptureTypeUnknown = 3, }; +/// Wrapper for FWFWKMediaCaptureType to allow for nullability. +@interface FWFWKMediaCaptureTypeBox : NSObject +@property(nonatomic, assign) FWFWKMediaCaptureType value; +- (instancetype)initWithValue:(FWFWKMediaCaptureType)value; +@end + @class FWFNSKeyValueObservingOptionsEnumData; @class FWFNSKeyValueChangeKeyEnumData; -@class FWFWKUserScriptInjectionTimeEnumData; @class FWFWKAudiovisualMediaTypeEnumData; @class FWFWKWebsiteDataTypeEnumData; -@class FWFWKNavigationActionPolicyEnumData; @class FWFNSHttpCookiePropertyKeyEnumData; -@class FWFWKPermissionDecisionData; -@class FWFWKMediaCaptureTypeData; @class FWFNSUrlRequestData; @class FWFWKUserScriptData; @class FWFWKNavigationActionData; @@ -231,13 +293,6 @@ typedef NS_ENUM(NSUInteger, FWFWKMediaCaptureType) { @property(nonatomic, assign) FWFNSKeyValueChangeKeyEnum value; @end -@interface FWFWKUserScriptInjectionTimeEnumData : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithValue:(FWFWKUserScriptInjectionTimeEnum)value; -@property(nonatomic, assign) FWFWKUserScriptInjectionTimeEnum value; -@end - @interface FWFWKAudiovisualMediaTypeEnumData : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; @@ -252,13 +307,6 @@ typedef NS_ENUM(NSUInteger, FWFWKMediaCaptureType) { @property(nonatomic, assign) FWFWKWebsiteDataTypeEnum value; @end -@interface FWFWKNavigationActionPolicyEnumData : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithValue:(FWFWKNavigationActionPolicyEnum)value; -@property(nonatomic, assign) FWFWKNavigationActionPolicyEnum value; -@end - @interface FWFNSHttpCookiePropertyKeyEnumData : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; @@ -266,20 +314,6 @@ typedef NS_ENUM(NSUInteger, FWFWKMediaCaptureType) { @property(nonatomic, assign) FWFNSHttpCookiePropertyKeyEnum value; @end -@interface FWFWKPermissionDecisionData : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithValue:(FWFWKPermissionDecision)value; -@property(nonatomic, assign) FWFWKPermissionDecision value; -@end - -@interface FWFWKMediaCaptureTypeData : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithValue:(FWFWKMediaCaptureType)value; -@property(nonatomic, assign) FWFWKMediaCaptureType value; -@end - /// Mirror of NSURLRequest. /// /// See https://developer.apple.com/documentation/foundation/nsurlrequest?language=objc. @@ -303,10 +337,10 @@ typedef NS_ENUM(NSUInteger, FWFWKMediaCaptureType) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithSource:(NSString *)source - injectionTime:(nullable FWFWKUserScriptInjectionTimeEnumData *)injectionTime + injectionTime:(nullable FWFWKUserScriptInjectionTimeEnumBox *)injectionTime isMainFrameOnly:(NSNumber *)isMainFrameOnly; @property(nonatomic, copy) NSString *source; -@property(nonatomic, strong, nullable) FWFWKUserScriptInjectionTimeEnumData *injectionTime; +@property(nonatomic, strong, nullable) FWFWKUserScriptInjectionTimeEnumBox *injectionTime; @property(nonatomic, strong) NSNumber *isMainFrameOnly; @end @@ -354,9 +388,9 @@ typedef NS_ENUM(NSUInteger, FWFWKMediaCaptureType) { @interface FWFWKScriptMessageData : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithName:(NSString *)name body:(id)body; ++ (instancetype)makeWithName:(NSString *)name body:(nullable id)body; @property(nonatomic, copy) NSString *name; -@property(nonatomic, strong) id body; +@property(nonatomic, strong, nullable) id body; @end /// Mirror of WKSecurityOrigin. @@ -389,8 +423,8 @@ typedef NS_ENUM(NSUInteger, FWFWKMediaCaptureType) { @interface FWFObjectOrIdentifier : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithValue:(id)value isIdentifier:(NSNumber *)isIdentifier; -@property(nonatomic, strong) id value; ++ (instancetype)makeWithValue:(nullable id)value isIdentifier:(NSNumber *)isIdentifier; +@property(nonatomic, strong, nullable) id value; /// Whether value is an int that is used to retrieve an instance stored in an /// `InstanceManager`. @property(nonatomic, strong) NSNumber *isIdentifier; @@ -628,8 +662,7 @@ NSObject *FWFWKNavigationDelegateFlutterApiGetCodec(void); navigationAction: (FWFWKNavigationActionData *)navigationAction completion: - (void (^)(FWFWKNavigationActionPolicyEnumData - *_Nullable, + (void (^)(FWFFWFWKNavigationActionPolicyEnum, FlutterError *_Nullable))completion; - (void)didFailNavigationForDelegateWithIdentifier:(NSNumber *)identifier webViewIdentifier:(NSNumber *)webViewIdentifier @@ -790,11 +823,10 @@ NSObject *FWFWKUIDelegateFlutterApiGetCodec(void); webViewIdentifier:(NSNumber *)webViewIdentifier origin:(FWFWKSecurityOriginData *)origin frame:(FWFWKFrameInfoData *)frame - type:(FWFWKMediaCaptureTypeData *)type - completion: - (void (^)( - FWFWKPermissionDecisionData *_Nullable, - FlutterError *_Nullable))completion; + type:(FWFWKMediaCaptureType)type + completion:(void (^)(FWFFWFWKPermissionDecision, + FlutterError *_Nullable)) + completion; @end /// The codec used by FWFWKHttpCookieStoreHostApi. diff --git a/packages/webview_flutter/webview_flutter_wkwebview/ios/Classes/FWFGeneratedWebKitApis.m b/packages/webview_flutter/webview_flutter_wkwebview/ios/Classes/FWFGeneratedWebKitApis.m index d8d4e2972eeb..bbc3e8d6a17a 100644 --- a/packages/webview_flutter/webview_flutter_wkwebview/ios/Classes/FWFGeneratedWebKitApis.m +++ b/packages/webview_flutter/webview_flutter_wkwebview/ios/Classes/FWFGeneratedWebKitApis.m @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v10.1.4), do not edit directly. +// Autogenerated from Pigeon (v11.0.1), do not edit directly. // See also: https://pub.dev/packages/pigeon #import "FWFGeneratedWebKitApis.h" @@ -16,6 +16,154 @@ #error File requires ARC to be enabled. #endif +/// Mirror of NSKeyValueObservingOptions. +/// +/// See +/// https://developer.apple.com/documentation/foundation/nskeyvalueobservingoptions?language=objc. +@implementation FWFNSKeyValueObservingOptionsEnumBox +- (instancetype)initWithValue:(FWFNSKeyValueObservingOptionsEnum)value { + self = [super init]; + if (self) { + _value = value; + } + return self; +} +@end + +/// Mirror of NSKeyValueChange. +/// +/// See https://developer.apple.com/documentation/foundation/nskeyvaluechange?language=objc. +@implementation FWFNSKeyValueChangeEnumBox +- (instancetype)initWithValue:(FWFNSKeyValueChangeEnum)value { + self = [super init]; + if (self) { + _value = value; + } + return self; +} +@end + +/// Mirror of NSKeyValueChangeKey. +/// +/// See https://developer.apple.com/documentation/foundation/nskeyvaluechangekey?language=objc. +@implementation FWFNSKeyValueChangeKeyEnumBox +- (instancetype)initWithValue:(FWFNSKeyValueChangeKeyEnum)value { + self = [super init]; + if (self) { + _value = value; + } + return self; +} +@end + +/// Mirror of WKUserScriptInjectionTime. +/// +/// See https://developer.apple.com/documentation/webkit/wkuserscriptinjectiontime?language=objc. +@implementation FWFWKUserScriptInjectionTimeEnumBox +- (instancetype)initWithValue:(FWFWKUserScriptInjectionTimeEnum)value { + self = [super init]; + if (self) { + _value = value; + } + return self; +} +@end + +/// Mirror of WKAudiovisualMediaTypes. +/// +/// See +/// [WKAudiovisualMediaTypes](https://developer.apple.com/documentation/webkit/wkaudiovisualmediatypes?language=objc). +@implementation FWFWKAudiovisualMediaTypeEnumBox +- (instancetype)initWithValue:(FWFWKAudiovisualMediaTypeEnum)value { + self = [super init]; + if (self) { + _value = value; + } + return self; +} +@end + +/// Mirror of WKWebsiteDataTypes. +/// +/// See +/// https://developer.apple.com/documentation/webkit/wkwebsitedatarecord/data_store_record_types?language=objc. +@implementation FWFWKWebsiteDataTypeEnumBox +- (instancetype)initWithValue:(FWFWKWebsiteDataTypeEnum)value { + self = [super init]; + if (self) { + _value = value; + } + return self; +} +@end + +/// Mirror of WKNavigationActionPolicy. +/// +/// See https://developer.apple.com/documentation/webkit/wknavigationactionpolicy?language=objc. +@implementation FWFWKNavigationActionPolicyEnumBox +- (instancetype)initWithValue:(FWFWKNavigationActionPolicyEnum)value { + self = [super init]; + if (self) { + _value = value; + } + return self; +} +@end + +/// Mirror of NSHTTPCookiePropertyKey. +/// +/// See https://developer.apple.com/documentation/foundation/nshttpcookiepropertykey. +@implementation FWFNSHttpCookiePropertyKeyEnumBox +- (instancetype)initWithValue:(FWFNSHttpCookiePropertyKeyEnum)value { + self = [super init]; + if (self) { + _value = value; + } + return self; +} +@end + +/// An object that contains information about an action that causes navigation +/// to occur. +/// +/// Wraps +/// [WKNavigationType](https://developer.apple.com/documentation/webkit/wknavigationaction?language=objc). +@implementation FWFWKNavigationTypeBox +- (instancetype)initWithValue:(FWFWKNavigationType)value { + self = [super init]; + if (self) { + _value = value; + } + return self; +} +@end + +/// Possible permission decisions for device resource access. +/// +/// See https://developer.apple.com/documentation/webkit/wkpermissiondecision?language=objc. +@implementation FWFWKPermissionDecisionBox +- (instancetype)initWithValue:(FWFWKPermissionDecision)value { + self = [super init]; + if (self) { + _value = value; + } + return self; +} +@end + +/// List of the types of media devices that can capture audio, video, or both. +/// +/// See https://developer.apple.com/documentation/webkit/wkmediacapturetype?language=objc. +@implementation FWFWKMediaCaptureTypeBox +- (instancetype)initWithValue:(FWFWKMediaCaptureType)value { + self = [super init]; + if (self) { + _value = value; + } + return self; +} +@end + static NSArray *wrapResult(id result, FlutterError *error) { if (error) { return @[ @@ -41,12 +189,6 @@ + (nullable FWFNSKeyValueChangeKeyEnumData *)nullableFromList:(NSArray *)list; - (NSArray *)toList; @end -@interface FWFWKUserScriptInjectionTimeEnumData () -+ (FWFWKUserScriptInjectionTimeEnumData *)fromList:(NSArray *)list; -+ (nullable FWFWKUserScriptInjectionTimeEnumData *)nullableFromList:(NSArray *)list; -- (NSArray *)toList; -@end - @interface FWFWKAudiovisualMediaTypeEnumData () + (FWFWKAudiovisualMediaTypeEnumData *)fromList:(NSArray *)list; + (nullable FWFWKAudiovisualMediaTypeEnumData *)nullableFromList:(NSArray *)list; @@ -59,30 +201,12 @@ + (nullable FWFWKWebsiteDataTypeEnumData *)nullableFromList:(NSArray *)list; - (NSArray *)toList; @end -@interface FWFWKNavigationActionPolicyEnumData () -+ (FWFWKNavigationActionPolicyEnumData *)fromList:(NSArray *)list; -+ (nullable FWFWKNavigationActionPolicyEnumData *)nullableFromList:(NSArray *)list; -- (NSArray *)toList; -@end - @interface FWFNSHttpCookiePropertyKeyEnumData () + (FWFNSHttpCookiePropertyKeyEnumData *)fromList:(NSArray *)list; + (nullable FWFNSHttpCookiePropertyKeyEnumData *)nullableFromList:(NSArray *)list; - (NSArray *)toList; @end -@interface FWFWKPermissionDecisionData () -+ (FWFWKPermissionDecisionData *)fromList:(NSArray *)list; -+ (nullable FWFWKPermissionDecisionData *)nullableFromList:(NSArray *)list; -- (NSArray *)toList; -@end - -@interface FWFWKMediaCaptureTypeData () -+ (FWFWKMediaCaptureTypeData *)fromList:(NSArray *)list; -+ (nullable FWFWKMediaCaptureTypeData *)nullableFromList:(NSArray *)list; -- (NSArray *)toList; -@end - @interface FWFNSUrlRequestData () + (FWFNSUrlRequestData *)fromList:(NSArray *)list; + (nullable FWFNSUrlRequestData *)nullableFromList:(NSArray *)list; @@ -181,29 +305,6 @@ - (NSArray *)toList { } @end -@implementation FWFWKUserScriptInjectionTimeEnumData -+ (instancetype)makeWithValue:(FWFWKUserScriptInjectionTimeEnum)value { - FWFWKUserScriptInjectionTimeEnumData *pigeonResult = - [[FWFWKUserScriptInjectionTimeEnumData alloc] init]; - pigeonResult.value = value; - return pigeonResult; -} -+ (FWFWKUserScriptInjectionTimeEnumData *)fromList:(NSArray *)list { - FWFWKUserScriptInjectionTimeEnumData *pigeonResult = - [[FWFWKUserScriptInjectionTimeEnumData alloc] init]; - pigeonResult.value = [GetNullableObjectAtIndex(list, 0) integerValue]; - return pigeonResult; -} -+ (nullable FWFWKUserScriptInjectionTimeEnumData *)nullableFromList:(NSArray *)list { - return (list) ? [FWFWKUserScriptInjectionTimeEnumData fromList:list] : nil; -} -- (NSArray *)toList { - return @[ - @(self.value), - ]; -} -@end - @implementation FWFWKAudiovisualMediaTypeEnumData + (instancetype)makeWithValue:(FWFWKAudiovisualMediaTypeEnum)value { FWFWKAudiovisualMediaTypeEnumData *pigeonResult = @@ -248,29 +349,6 @@ - (NSArray *)toList { } @end -@implementation FWFWKNavigationActionPolicyEnumData -+ (instancetype)makeWithValue:(FWFWKNavigationActionPolicyEnum)value { - FWFWKNavigationActionPolicyEnumData *pigeonResult = - [[FWFWKNavigationActionPolicyEnumData alloc] init]; - pigeonResult.value = value; - return pigeonResult; -} -+ (FWFWKNavigationActionPolicyEnumData *)fromList:(NSArray *)list { - FWFWKNavigationActionPolicyEnumData *pigeonResult = - [[FWFWKNavigationActionPolicyEnumData alloc] init]; - pigeonResult.value = [GetNullableObjectAtIndex(list, 0) integerValue]; - return pigeonResult; -} -+ (nullable FWFWKNavigationActionPolicyEnumData *)nullableFromList:(NSArray *)list { - return (list) ? [FWFWKNavigationActionPolicyEnumData fromList:list] : nil; -} -- (NSArray *)toList { - return @[ - @(self.value), - ]; -} -@end - @implementation FWFNSHttpCookiePropertyKeyEnumData + (instancetype)makeWithValue:(FWFNSHttpCookiePropertyKeyEnum)value { FWFNSHttpCookiePropertyKeyEnumData *pigeonResult = @@ -294,48 +372,6 @@ - (NSArray *)toList { } @end -@implementation FWFWKPermissionDecisionData -+ (instancetype)makeWithValue:(FWFWKPermissionDecision)value { - FWFWKPermissionDecisionData *pigeonResult = [[FWFWKPermissionDecisionData alloc] init]; - pigeonResult.value = value; - return pigeonResult; -} -+ (FWFWKPermissionDecisionData *)fromList:(NSArray *)list { - FWFWKPermissionDecisionData *pigeonResult = [[FWFWKPermissionDecisionData alloc] init]; - pigeonResult.value = [GetNullableObjectAtIndex(list, 0) integerValue]; - return pigeonResult; -} -+ (nullable FWFWKPermissionDecisionData *)nullableFromList:(NSArray *)list { - return (list) ? [FWFWKPermissionDecisionData fromList:list] : nil; -} -- (NSArray *)toList { - return @[ - @(self.value), - ]; -} -@end - -@implementation FWFWKMediaCaptureTypeData -+ (instancetype)makeWithValue:(FWFWKMediaCaptureType)value { - FWFWKMediaCaptureTypeData *pigeonResult = [[FWFWKMediaCaptureTypeData alloc] init]; - pigeonResult.value = value; - return pigeonResult; -} -+ (FWFWKMediaCaptureTypeData *)fromList:(NSArray *)list { - FWFWKMediaCaptureTypeData *pigeonResult = [[FWFWKMediaCaptureTypeData alloc] init]; - pigeonResult.value = [GetNullableObjectAtIndex(list, 0) integerValue]; - return pigeonResult; -} -+ (nullable FWFWKMediaCaptureTypeData *)nullableFromList:(NSArray *)list { - return (list) ? [FWFWKMediaCaptureTypeData fromList:list] : nil; -} -- (NSArray *)toList { - return @[ - @(self.value), - ]; -} -@end - @implementation FWFNSUrlRequestData + (instancetype)makeWithUrl:(NSString *)url httpMethod:(nullable NSString *)httpMethod @@ -373,7 +409,7 @@ - (NSArray *)toList { @implementation FWFWKUserScriptData + (instancetype)makeWithSource:(NSString *)source - injectionTime:(nullable FWFWKUserScriptInjectionTimeEnumData *)injectionTime + injectionTime:(nullable FWFWKUserScriptInjectionTimeEnumBox *)injectionTime isMainFrameOnly:(NSNumber *)isMainFrameOnly { FWFWKUserScriptData *pigeonResult = [[FWFWKUserScriptData alloc] init]; pigeonResult.source = source; @@ -385,8 +421,12 @@ + (FWFWKUserScriptData *)fromList:(NSArray *)list { FWFWKUserScriptData *pigeonResult = [[FWFWKUserScriptData alloc] init]; pigeonResult.source = GetNullableObjectAtIndex(list, 0); NSAssert(pigeonResult.source != nil, @""); - pigeonResult.injectionTime = - [FWFWKUserScriptInjectionTimeEnumData nullableFromList:(GetNullableObjectAtIndex(list, 1))]; + NSNumber *injectionTimeAsNumber = GetNullableObjectAtIndex(list, 1); + FWFWKUserScriptInjectionTimeEnumBox *injectionTime = + injectionTimeAsNumber == nil ? nil + : [[FWFWKUserScriptInjectionTimeEnumBox alloc] + initWithValue:[injectionTimeAsNumber integerValue]]; + pigeonResult.injectionTime = injectionTime; pigeonResult.isMainFrameOnly = GetNullableObjectAtIndex(list, 2); NSAssert(pigeonResult.isMainFrameOnly != nil, @""); return pigeonResult; @@ -397,7 +437,8 @@ + (nullable FWFWKUserScriptData *)nullableFromList:(NSArray *)list { - (NSArray *)toList { return @[ (self.source ?: [NSNull null]), - (self.injectionTime ? [self.injectionTime toList] : [NSNull null]), + (self.injectionTime == nil ? [NSNull null] + : [NSNumber numberWithInteger:self.injectionTime.value]), (self.isMainFrameOnly ?: [NSNull null]), ]; } @@ -489,7 +530,7 @@ - (NSArray *)toList { @end @implementation FWFWKScriptMessageData -+ (instancetype)makeWithName:(NSString *)name body:(id)body { ++ (instancetype)makeWithName:(NSString *)name body:(nullable id)body { FWFWKScriptMessageData *pigeonResult = [[FWFWKScriptMessageData alloc] init]; pigeonResult.name = name; pigeonResult.body = body; @@ -571,7 +612,7 @@ - (NSArray *)toList { @end @implementation FWFObjectOrIdentifier -+ (instancetype)makeWithValue:(id)value isIdentifier:(NSNumber *)isIdentifier { ++ (instancetype)makeWithValue:(nullable id)value isIdentifier:(NSNumber *)isIdentifier { FWFObjectOrIdentifier *pigeonResult = [[FWFObjectOrIdentifier alloc] init]; pigeonResult.value = value; pigeonResult.isIdentifier = isIdentifier; @@ -1111,8 +1152,6 @@ - (nullable id)readValueOfType:(UInt8)type { switch (type) { case 128: return [FWFWKUserScriptData fromList:[self readValue]]; - case 129: - return [FWFWKUserScriptInjectionTimeEnumData fromList:[self readValue]]; default: return [super readValueOfType:type]; } @@ -1126,9 +1165,6 @@ - (void)writeValue:(id)value { if ([value isKindOfClass:[FWFWKUserScriptData class]]) { [self writeByte:128]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FWFWKUserScriptInjectionTimeEnumData class]]) { - [self writeByte:129]; - [self writeValue:[value toList]]; } else { [super writeValue:value]; } @@ -1533,8 +1569,6 @@ - (nullable id)readValueOfType:(UInt8)type { return [FWFWKFrameInfoData fromList:[self readValue]]; case 131: return [FWFWKNavigationActionData fromList:[self readValue]]; - case 132: - return [FWFWKNavigationActionPolicyEnumData fromList:[self readValue]]; default: return [super readValueOfType:type]; } @@ -1557,9 +1591,6 @@ - (void)writeValue:(id)value { } else if ([value isKindOfClass:[FWFWKNavigationActionData class]]) { [self writeByte:131]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FWFWKNavigationActionPolicyEnumData class]]) { - [self writeByte:132]; - [self writeValue:[value toList]]; } else { [super writeValue:value]; } @@ -1642,8 +1673,7 @@ - (void)decidePolicyForNavigationActionForDelegateWithIdentifier:(NSNumber *)arg arg_navigationAction completion: (void (^)( - FWFWKNavigationActionPolicyEnumData - *_Nullable, + FWFFWFWKNavigationActionPolicyEnum, FlutterError *_Nullable))completion { FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.webview_flutter_wkwebview." @@ -1655,7 +1685,7 @@ - (void)decidePolicyForNavigationActionForDelegateWithIdentifier:(NSNumber *)arg arg_navigationAction ?: [NSNull null] ] reply:^(id reply) { - FWFWKNavigationActionPolicyEnumData *output = reply; + FWFWKNavigationActionPolicyEnum output = [reply integerValue]; completion(output, nil); }]; } @@ -1970,22 +2000,14 @@ - (nullable id)readValueOfType:(UInt8)type { case 136: return [FWFWKFrameInfoData fromList:[self readValue]]; case 137: - return [FWFWKMediaCaptureTypeData fromList:[self readValue]]; - case 138: return [FWFWKNavigationActionData fromList:[self readValue]]; - case 139: - return [FWFWKNavigationActionPolicyEnumData fromList:[self readValue]]; - case 140: - return [FWFWKPermissionDecisionData fromList:[self readValue]]; - case 141: + case 138: return [FWFWKScriptMessageData fromList:[self readValue]]; - case 142: + case 139: return [FWFWKSecurityOriginData fromList:[self readValue]]; - case 143: + case 140: return [FWFWKUserScriptData fromList:[self readValue]]; - case 144: - return [FWFWKUserScriptInjectionTimeEnumData fromList:[self readValue]]; - case 145: + case 141: return [FWFWKWebsiteDataTypeEnumData fromList:[self readValue]]; default: return [super readValueOfType:type]; @@ -2024,32 +2046,20 @@ - (void)writeValue:(id)value { } else if ([value isKindOfClass:[FWFWKFrameInfoData class]]) { [self writeByte:136]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FWFWKMediaCaptureTypeData class]]) { - [self writeByte:137]; - [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FWFWKNavigationActionData class]]) { - [self writeByte:138]; - [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FWFWKNavigationActionPolicyEnumData class]]) { - [self writeByte:139]; - [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FWFWKPermissionDecisionData class]]) { - [self writeByte:140]; + [self writeByte:137]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FWFWKScriptMessageData class]]) { - [self writeByte:141]; + [self writeByte:138]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FWFWKSecurityOriginData class]]) { - [self writeByte:142]; + [self writeByte:139]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FWFWKUserScriptData class]]) { - [self writeByte:143]; - [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FWFWKUserScriptInjectionTimeEnumData class]]) { - [self writeByte:144]; + [self writeByte:140]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FWFWKWebsiteDataTypeEnumData class]]) { - [self writeByte:145]; + [self writeByte:141]; [self writeValue:[value toList]]; } else { [super writeValue:value]; @@ -2580,12 +2590,8 @@ - (nullable id)readValueOfType:(UInt8)type { case 129: return [FWFWKFrameInfoData fromList:[self readValue]]; case 130: - return [FWFWKMediaCaptureTypeData fromList:[self readValue]]; - case 131: return [FWFWKNavigationActionData fromList:[self readValue]]; - case 132: - return [FWFWKPermissionDecisionData fromList:[self readValue]]; - case 133: + case 131: return [FWFWKSecurityOriginData fromList:[self readValue]]; default: return [super readValueOfType:type]; @@ -2603,17 +2609,11 @@ - (void)writeValue:(id)value { } else if ([value isKindOfClass:[FWFWKFrameInfoData class]]) { [self writeByte:129]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FWFWKMediaCaptureTypeData class]]) { - [self writeByte:130]; - [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FWFWKNavigationActionData class]]) { - [self writeByte:131]; - [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FWFWKPermissionDecisionData class]]) { - [self writeByte:132]; + [self writeByte:130]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FWFWKSecurityOriginData class]]) { - [self writeByte:133]; + [self writeByte:131]; [self writeValue:[value toList]]; } else { [super writeValue:value]; @@ -2678,11 +2678,10 @@ - (void)requestMediaCapturePermissionForDelegateWithIdentifier:(NSNumber *)arg_i webViewIdentifier:(NSNumber *)arg_webViewIdentifier origin:(FWFWKSecurityOriginData *)arg_origin frame:(FWFWKFrameInfoData *)arg_frame - type:(FWFWKMediaCaptureTypeData *)arg_type - completion: - (void (^)( - FWFWKPermissionDecisionData *_Nullable, - FlutterError *_Nullable))completion { + type:(FWFWKMediaCaptureType)arg_type + completion:(void (^)(FWFFWFWKPermissionDecision, + FlutterError *_Nullable)) + completion { FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.webview_flutter_wkwebview.WKUIDelegateFlutterApi." @"requestMediaCapturePermission" @@ -2690,10 +2689,10 @@ - (void)requestMediaCapturePermissionForDelegateWithIdentifier:(NSNumber *)arg_i codec:FWFWKUIDelegateFlutterApiGetCodec()]; [channel sendMessage:@[ arg_identifier ?: [NSNull null], arg_webViewIdentifier ?: [NSNull null], - arg_origin ?: [NSNull null], arg_frame ?: [NSNull null], arg_type ?: [NSNull null] + arg_origin ?: [NSNull null], arg_frame ?: [NSNull null], [NSNumber numberWithInteger:arg_type] ] reply:^(id reply) { - FWFWKPermissionDecisionData *output = reply; + FWFWKPermissionDecision output = [reply integerValue]; completion(output, nil); }]; } diff --git a/packages/webview_flutter/webview_flutter_wkwebview/lib/src/common/web_kit.g.dart b/packages/webview_flutter/webview_flutter_wkwebview/lib/src/common/web_kit.g.dart index 25649a01099f..aa132a162647 100644 --- a/packages/webview_flutter/webview_flutter_wkwebview/lib/src/common/web_kit.g.dart +++ b/packages/webview_flutter/webview_flutter_wkwebview/lib/src/common/web_kit.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v10.1.4), do not edit directly. +// Autogenerated from Pigeon (v11.0.1), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import @@ -233,27 +233,6 @@ class NSKeyValueChangeKeyEnumData { } } -class WKUserScriptInjectionTimeEnumData { - WKUserScriptInjectionTimeEnumData({ - required this.value, - }); - - WKUserScriptInjectionTimeEnum value; - - Object encode() { - return [ - value.index, - ]; - } - - static WKUserScriptInjectionTimeEnumData decode(Object result) { - result as List; - return WKUserScriptInjectionTimeEnumData( - value: WKUserScriptInjectionTimeEnum.values[result[0]! as int], - ); - } -} - class WKAudiovisualMediaTypeEnumData { WKAudiovisualMediaTypeEnumData({ required this.value, @@ -296,27 +275,6 @@ class WKWebsiteDataTypeEnumData { } } -class WKNavigationActionPolicyEnumData { - WKNavigationActionPolicyEnumData({ - required this.value, - }); - - WKNavigationActionPolicyEnum value; - - Object encode() { - return [ - value.index, - ]; - } - - static WKNavigationActionPolicyEnumData decode(Object result) { - result as List; - return WKNavigationActionPolicyEnumData( - value: WKNavigationActionPolicyEnum.values[result[0]! as int], - ); - } -} - class NSHttpCookiePropertyKeyEnumData { NSHttpCookiePropertyKeyEnumData({ required this.value, @@ -338,48 +296,6 @@ class NSHttpCookiePropertyKeyEnumData { } } -class WKPermissionDecisionData { - WKPermissionDecisionData({ - required this.value, - }); - - WKPermissionDecision value; - - Object encode() { - return [ - value.index, - ]; - } - - static WKPermissionDecisionData decode(Object result) { - result as List; - return WKPermissionDecisionData( - value: WKPermissionDecision.values[result[0]! as int], - ); - } -} - -class WKMediaCaptureTypeData { - WKMediaCaptureTypeData({ - required this.value, - }); - - WKMediaCaptureType value; - - Object encode() { - return [ - value.index, - ]; - } - - static WKMediaCaptureTypeData decode(Object result) { - result as List; - return WKMediaCaptureTypeData( - value: WKMediaCaptureType.values[result[0]! as int], - ); - } -} - /// Mirror of NSURLRequest. /// /// See https://developer.apple.com/documentation/foundation/nsurlrequest?language=objc. @@ -432,14 +348,14 @@ class WKUserScriptData { String source; - WKUserScriptInjectionTimeEnumData? injectionTime; + WKUserScriptInjectionTimeEnum? injectionTime; bool isMainFrameOnly; Object encode() { return [ source, - injectionTime?.encode(), + injectionTime?.index, isMainFrameOnly, ]; } @@ -449,8 +365,7 @@ class WKUserScriptData { return WKUserScriptData( source: result[0]! as String, injectionTime: result[1] != null - ? WKUserScriptInjectionTimeEnumData.decode( - result[1]! as List) + ? WKUserScriptInjectionTimeEnum.values[result[1]! as int] : null, isMainFrameOnly: result[2]! as bool, ); @@ -1164,9 +1079,6 @@ class _WKUserContentControllerHostApiCodec extends StandardMessageCodec { if (value is WKUserScriptData) { buffer.putUint8(128); writeValue(buffer, value.encode()); - } else if (value is WKUserScriptInjectionTimeEnumData) { - buffer.putUint8(129); - writeValue(buffer, value.encode()); } else { super.writeValue(buffer, value); } @@ -1177,8 +1089,6 @@ class _WKUserContentControllerHostApiCodec extends StandardMessageCodec { switch (type) { case 128: return WKUserScriptData.decode(readValue(buffer)!); - case 129: - return WKUserScriptInjectionTimeEnumData.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); } @@ -1563,9 +1473,6 @@ class _WKNavigationDelegateFlutterApiCodec extends StandardMessageCodec { } else if (value is WKNavigationActionData) { buffer.putUint8(131); writeValue(buffer, value.encode()); - } else if (value is WKNavigationActionPolicyEnumData) { - buffer.putUint8(132); - writeValue(buffer, value.encode()); } else { super.writeValue(buffer, value); } @@ -1582,8 +1489,6 @@ class _WKNavigationDelegateFlutterApiCodec extends StandardMessageCodec { return WKFrameInfoData.decode(readValue(buffer)!); case 131: return WKNavigationActionData.decode(readValue(buffer)!); - case 132: - return WKNavigationActionPolicyEnumData.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); } @@ -1602,7 +1507,7 @@ abstract class WKNavigationDelegateFlutterApi { void didStartProvisionalNavigation( int identifier, int webViewIdentifier, String? url); - Future decidePolicyForNavigationAction( + Future decidePolicyForNavigationAction( int identifier, int webViewIdentifier, WKNavigationActionData navigationAction); @@ -1690,10 +1595,10 @@ abstract class WKNavigationDelegateFlutterApi { (args[2] as WKNavigationActionData?); assert(arg_navigationAction != null, 'Argument for dev.flutter.pigeon.webview_flutter_wkwebview.WKNavigationDelegateFlutterApi.decidePolicyForNavigationAction was null, expected non-null WKNavigationActionData.'); - final WKNavigationActionPolicyEnumData output = + final WKNavigationActionPolicyEnum output = await api.decidePolicyForNavigationAction(arg_identifier!, arg_webViewIdentifier!, arg_navigationAction!); - return output; + return output.index; }); } } @@ -2028,32 +1933,20 @@ class _WKWebViewHostApiCodec extends StandardMessageCodec { } else if (value is WKFrameInfoData) { buffer.putUint8(136); writeValue(buffer, value.encode()); - } else if (value is WKMediaCaptureTypeData) { - buffer.putUint8(137); - writeValue(buffer, value.encode()); } else if (value is WKNavigationActionData) { - buffer.putUint8(138); - writeValue(buffer, value.encode()); - } else if (value is WKNavigationActionPolicyEnumData) { - buffer.putUint8(139); - writeValue(buffer, value.encode()); - } else if (value is WKPermissionDecisionData) { - buffer.putUint8(140); + buffer.putUint8(137); writeValue(buffer, value.encode()); } else if (value is WKScriptMessageData) { - buffer.putUint8(141); + buffer.putUint8(138); writeValue(buffer, value.encode()); } else if (value is WKSecurityOriginData) { - buffer.putUint8(142); + buffer.putUint8(139); writeValue(buffer, value.encode()); } else if (value is WKUserScriptData) { - buffer.putUint8(143); - writeValue(buffer, value.encode()); - } else if (value is WKUserScriptInjectionTimeEnumData) { - buffer.putUint8(144); + buffer.putUint8(140); writeValue(buffer, value.encode()); } else if (value is WKWebsiteDataTypeEnumData) { - buffer.putUint8(145); + buffer.putUint8(141); writeValue(buffer, value.encode()); } else { super.writeValue(buffer, value); @@ -2082,22 +1975,14 @@ class _WKWebViewHostApiCodec extends StandardMessageCodec { case 136: return WKFrameInfoData.decode(readValue(buffer)!); case 137: - return WKMediaCaptureTypeData.decode(readValue(buffer)!); - case 138: return WKNavigationActionData.decode(readValue(buffer)!); - case 139: - return WKNavigationActionPolicyEnumData.decode(readValue(buffer)!); - case 140: - return WKPermissionDecisionData.decode(readValue(buffer)!); - case 141: + case 138: return WKScriptMessageData.decode(readValue(buffer)!); - case 142: + case 139: return WKSecurityOriginData.decode(readValue(buffer)!); - case 143: + case 140: return WKUserScriptData.decode(readValue(buffer)!); - case 144: - return WKUserScriptInjectionTimeEnumData.decode(readValue(buffer)!); - case 145: + case 141: return WKWebsiteDataTypeEnumData.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -2633,17 +2518,11 @@ class _WKUIDelegateFlutterApiCodec extends StandardMessageCodec { } else if (value is WKFrameInfoData) { buffer.putUint8(129); writeValue(buffer, value.encode()); - } else if (value is WKMediaCaptureTypeData) { - buffer.putUint8(130); - writeValue(buffer, value.encode()); } else if (value is WKNavigationActionData) { - buffer.putUint8(131); - writeValue(buffer, value.encode()); - } else if (value is WKPermissionDecisionData) { - buffer.putUint8(132); + buffer.putUint8(130); writeValue(buffer, value.encode()); } else if (value is WKSecurityOriginData) { - buffer.putUint8(133); + buffer.putUint8(131); writeValue(buffer, value.encode()); } else { super.writeValue(buffer, value); @@ -2658,12 +2537,8 @@ class _WKUIDelegateFlutterApiCodec extends StandardMessageCodec { case 129: return WKFrameInfoData.decode(readValue(buffer)!); case 130: - return WKMediaCaptureTypeData.decode(readValue(buffer)!); - case 131: return WKNavigationActionData.decode(readValue(buffer)!); - case 132: - return WKPermissionDecisionData.decode(readValue(buffer)!); - case 133: + case 131: return WKSecurityOriginData.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -2681,12 +2556,12 @@ abstract class WKUIDelegateFlutterApi { int configurationIdentifier, WKNavigationActionData navigationAction); /// Callback to Dart function `WKUIDelegate.requestMediaCapturePermission`. - Future requestMediaCapturePermission( + Future requestMediaCapturePermission( int identifier, int webViewIdentifier, WKSecurityOriginData origin, WKFrameInfoData frame, - WKMediaCaptureTypeData type); + WKMediaCaptureType type); static void setup(WKUIDelegateFlutterApi? api, {BinaryMessenger? binaryMessenger}) { @@ -2746,14 +2621,15 @@ abstract class WKUIDelegateFlutterApi { final WKFrameInfoData? arg_frame = (args[3] as WKFrameInfoData?); assert(arg_frame != null, 'Argument for dev.flutter.pigeon.webview_flutter_wkwebview.WKUIDelegateFlutterApi.requestMediaCapturePermission was null, expected non-null WKFrameInfoData.'); - final WKMediaCaptureTypeData? arg_type = - (args[4] as WKMediaCaptureTypeData?); + final WKMediaCaptureType? arg_type = args[4] == null + ? null + : WKMediaCaptureType.values[args[4]! as int]; assert(arg_type != null, - 'Argument for dev.flutter.pigeon.webview_flutter_wkwebview.WKUIDelegateFlutterApi.requestMediaCapturePermission was null, expected non-null WKMediaCaptureTypeData.'); - final WKPermissionDecisionData output = + 'Argument for dev.flutter.pigeon.webview_flutter_wkwebview.WKUIDelegateFlutterApi.requestMediaCapturePermission was null, expected non-null WKMediaCaptureType.'); + final WKPermissionDecision output = await api.requestMediaCapturePermission(arg_identifier!, arg_webViewIdentifier!, arg_origin!, arg_frame!, arg_type!); - return output; + return output.index; }); } } diff --git a/packages/webview_flutter/webview_flutter_wkwebview/lib/src/web_kit/web_kit_api_impls.dart b/packages/webview_flutter/webview_flutter_wkwebview/lib/src/web_kit/web_kit_api_impls.dart index ccc87377cb04..1497d0d5d9c1 100644 --- a/packages/webview_flutter/webview_flutter_wkwebview/lib/src/web_kit/web_kit_api_impls.dart +++ b/packages/webview_flutter/webview_flutter_wkwebview/lib/src/web_kit/web_kit_api_impls.dart @@ -65,11 +65,9 @@ extension _NSHttpCookieConverter on NSHttpCookie { } extension _WKNavigationActionPolicyConverter on WKNavigationActionPolicy { - WKNavigationActionPolicyEnumData toWKNavigationActionPolicyEnumData() { - return WKNavigationActionPolicyEnumData( - value: WKNavigationActionPolicyEnum.values.firstWhere( - (WKNavigationActionPolicyEnum element) => element.name == name, - ), + WKNavigationActionPolicyEnum toWKNavigationActionPolicyEnum() { + return WKNavigationActionPolicyEnum.values.firstWhere( + (WKNavigationActionPolicyEnum element) => element.name == name, ); } } @@ -127,18 +125,13 @@ extension _NSHttpCookiePropertyKeyConverter on NSHttpCookiePropertyKey { } extension _WKUserScriptInjectionTimeConverter on WKUserScriptInjectionTime { - WKUserScriptInjectionTimeEnumData toWKUserScriptInjectionTimeEnumData() { - late final WKUserScriptInjectionTimeEnum value; + WKUserScriptInjectionTimeEnum toWKUserScriptInjectionTimeEnum() { switch (this) { case WKUserScriptInjectionTime.atDocumentStart: - value = WKUserScriptInjectionTimeEnum.atDocumentStart; - break; + return WKUserScriptInjectionTimeEnum.atDocumentStart; case WKUserScriptInjectionTime.atDocumentEnd: - value = WKUserScriptInjectionTimeEnum.atDocumentEnd; - break; + return WKUserScriptInjectionTimeEnum.atDocumentEnd; } - - return WKUserScriptInjectionTimeEnumData(value: value); } } @@ -214,7 +207,7 @@ extension _WKUserScriptConverter on WKUserScript { WKUserScriptData toWKUserScriptData() { return WKUserScriptData( source: source, - injectionTime: injectionTime.toWKUserScriptInjectionTimeEnumData(), + injectionTime: injectionTime.toWKUserScriptInjectionTimeEnum(), isMainFrameOnly: isMainFrameOnly, ); } @@ -739,12 +732,12 @@ class WKUIDelegateFlutterApiImpl extends WKUIDelegateFlutterApi { } @override - Future requestMediaCapturePermission( + Future requestMediaCapturePermission( int identifier, int webViewIdentifier, WKSecurityOriginData origin, WKFrameInfoData frame, - WKMediaCaptureTypeData type, + WKMediaCaptureType type, ) async { final WKUIDelegate instance = instanceManager.getInstanceWithWeakReference(identifier)!; @@ -757,7 +750,7 @@ class WKUIDelegateFlutterApiImpl extends WKUIDelegateFlutterApi { as WKWebView, origin.toWKSecurityOrigin(), frame.toWKFrameInfo(), - type.value, + type, ); } else { // The default response for iOS is to prompt. See @@ -765,7 +758,7 @@ class WKUIDelegateFlutterApiImpl extends WKUIDelegateFlutterApi { decision = WKPermissionDecision.prompt; } - return WKPermissionDecisionData(value: decision); + return decision; } } @@ -823,7 +816,7 @@ class WKNavigationDelegateFlutterApiImpl } @override - Future decidePolicyForNavigationAction( + Future decidePolicyForNavigationAction( int identifier, int webViewIdentifier, WKNavigationActionData navigationAction, @@ -834,9 +827,7 @@ class WKNavigationDelegateFlutterApiImpl )? function = _getDelegate(identifier).decidePolicyForNavigationAction; if (function == null) { - return WKNavigationActionPolicyEnumData( - value: WKNavigationActionPolicyEnum.allow, - ); + return WKNavigationActionPolicyEnum.allow; } final WKNavigationActionPolicy policy = await function( @@ -844,7 +835,7 @@ class WKNavigationDelegateFlutterApiImpl as WKWebView, navigationAction.toNavigationAction(), ); - return policy.toWKNavigationActionPolicyEnumData(); + return policy.toWKNavigationActionPolicyEnum(); } @override diff --git a/packages/webview_flutter/webview_flutter_wkwebview/pigeons/web_kit.dart b/packages/webview_flutter/webview_flutter_wkwebview/pigeons/web_kit.dart index dea5080e556a..d66a6c95c7a9 100644 --- a/packages/webview_flutter/webview_flutter_wkwebview/pigeons/web_kit.dart +++ b/packages/webview_flutter/webview_flutter_wkwebview/pigeons/web_kit.dart @@ -29,7 +29,7 @@ enum NSKeyValueObservingOptionsEnum { } // TODO(bparrishMines): Enums need be wrapped in a data class because thay can't -// be used as primitive arguments. See https://github.com/flutter/flutter/issues/87307 +// be used as collection arguments. See https://github.com/flutter/flutter/issues/133728 class NSKeyValueObservingOptionsEnumData { late NSKeyValueObservingOptionsEnum value; } @@ -44,12 +44,6 @@ enum NSKeyValueChangeEnum { replacement, } -// TODO(bparrishMines): Enums need be wrapped in a data class because thay can't -// be used as primitive arguments. See https://github.com/flutter/flutter/issues/87307 -class NSKeyValueChangeEnumData { - late NSKeyValueChangeEnum value; -} - /// Mirror of NSKeyValueChangeKey. /// /// See https://developer.apple.com/documentation/foundation/nskeyvaluechangekey?language=objc. @@ -63,7 +57,7 @@ enum NSKeyValueChangeKeyEnum { } // TODO(bparrishMines): Enums need be wrapped in a data class because thay can't -// be used as primitive arguments. See https://github.com/flutter/flutter/issues/87307 +// be used as collection arguments. See https://github.com/flutter/flutter/issues/133728 class NSKeyValueChangeKeyEnumData { late NSKeyValueChangeKeyEnum value; } @@ -76,12 +70,6 @@ enum WKUserScriptInjectionTimeEnum { atDocumentEnd, } -// TODO(bparrishMines): Enums need be wrapped in a data class because thay can't -// be used as primitive arguments. See https://github.com/flutter/flutter/issues/87307 -class WKUserScriptInjectionTimeEnumData { - late WKUserScriptInjectionTimeEnum value; -} - /// Mirror of WKAudiovisualMediaTypes. /// /// See [WKAudiovisualMediaTypes](https://developer.apple.com/documentation/webkit/wkaudiovisualmediatypes?language=objc). @@ -126,12 +114,6 @@ enum WKNavigationActionPolicyEnum { cancel, } -// TODO(bparrishMines): Enums need be wrapped in a data class because thay can't -// be used as primitive arguments. See https://github.com/flutter/flutter/issues/87307 -class WKNavigationActionPolicyEnumData { - late WKNavigationActionPolicyEnum value; -} - /// Mirror of NSHTTPCookiePropertyKey. /// /// See https://developer.apple.com/documentation/foundation/nshttpcookiepropertykey. @@ -153,7 +135,7 @@ enum NSHttpCookiePropertyKeyEnum { } // TODO(bparrishMines): Enums need be wrapped in a data class because thay can't -// be used as primitive arguments. See https://github.com/flutter/flutter/issues/87307 +// be used as collection arguments. See https://github.com/flutter/flutter/issues/133728 class NSHttpCookiePropertyKeyEnumData { late NSHttpCookiePropertyKeyEnum value; } @@ -220,12 +202,6 @@ enum WKPermissionDecision { prompt, } -// TODO(bparrishMines): Enums need be wrapped in a data class because thay can't -// be used as primitive arguments. See https://github.com/flutter/flutter/issues/87307 -class WKPermissionDecisionData { - late WKPermissionDecision value; -} - /// List of the types of media devices that can capture audio, video, or both. /// /// See https://developer.apple.com/documentation/webkit/wkmediacapturetype?language=objc. @@ -252,12 +228,6 @@ enum WKMediaCaptureType { unknown, } -// TODO(bparrishMines): Enums need be wrapped in a data class because thay can't -// be used as primitive arguments. See https://github.com/flutter/flutter/issues/87307 -class WKMediaCaptureTypeData { - late WKMediaCaptureType value; -} - /// Mirror of NSURLRequest. /// /// See https://developer.apple.com/documentation/foundation/nsurlrequest?language=objc. @@ -273,7 +243,7 @@ class NSUrlRequestData { /// See https://developer.apple.com/documentation/webkit/wkuserscript?language=objc. class WKUserScriptData { late String source; - late WKUserScriptInjectionTimeEnumData? injectionTime; + late WKUserScriptInjectionTimeEnum? injectionTime; late bool isMainFrameOnly; } @@ -551,7 +521,7 @@ abstract class WKNavigationDelegateFlutterApi { 'decidePolicyForNavigationActionForDelegateWithIdentifier:webViewIdentifier:navigationAction:', ) @async - WKNavigationActionPolicyEnumData decidePolicyForNavigationAction( + WKNavigationActionPolicyEnum decidePolicyForNavigationAction( int identifier, int webViewIdentifier, WKNavigationActionData navigationAction, @@ -728,12 +698,12 @@ abstract class WKUIDelegateFlutterApi { 'requestMediaCapturePermissionForDelegateWithIdentifier:webViewIdentifier:origin:frame:type:', ) @async - WKPermissionDecisionData requestMediaCapturePermission( + WKPermissionDecision requestMediaCapturePermission( int identifier, int webViewIdentifier, WKSecurityOriginData origin, WKFrameInfoData frame, - WKMediaCaptureTypeData type, + WKMediaCaptureType type, ); } diff --git a/packages/webview_flutter/webview_flutter_wkwebview/pubspec.yaml b/packages/webview_flutter/webview_flutter_wkwebview/pubspec.yaml index 2c888669fa10..8460fc0f3bf3 100644 --- a/packages/webview_flutter/webview_flutter_wkwebview/pubspec.yaml +++ b/packages/webview_flutter/webview_flutter_wkwebview/pubspec.yaml @@ -2,7 +2,7 @@ name: webview_flutter_wkwebview description: A Flutter plugin that provides a WebView widget based on Apple's WKWebView control. repository: https://github.com/flutter/packages/tree/main/packages/webview_flutter/webview_flutter_wkwebview issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+webview%22 -version: 3.7.4 +version: 3.7.5 environment: sdk: ">=2.19.0 <4.0.0" @@ -27,7 +27,7 @@ dev_dependencies: flutter_test: sdk: flutter mockito: 5.4.1 - pigeon: ^10.1.4 + pigeon: ^11.0.0 topics: - html diff --git a/packages/webview_flutter/webview_flutter_wkwebview/test/src/common/test_web_kit.g.dart b/packages/webview_flutter/webview_flutter_wkwebview/test/src/common/test_web_kit.g.dart index ee9065ea6689..4aa200147bf1 100644 --- a/packages/webview_flutter/webview_flutter_wkwebview/test/src/common/test_web_kit.g.dart +++ b/packages/webview_flutter/webview_flutter_wkwebview/test/src/common/test_web_kit.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v10.1.4), do not edit directly. +// Autogenerated from Pigeon (v11.0.1), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, unnecessary_import // ignore_for_file: avoid_relative_lib_imports @@ -523,9 +523,6 @@ class _TestWKUserContentControllerHostApiCodec extends StandardMessageCodec { if (value is WKUserScriptData) { buffer.putUint8(128); writeValue(buffer, value.encode()); - } else if (value is WKUserScriptInjectionTimeEnumData) { - buffer.putUint8(129); - writeValue(buffer, value.encode()); } else { super.writeValue(buffer, value); } @@ -536,8 +533,6 @@ class _TestWKUserContentControllerHostApiCodec extends StandardMessageCodec { switch (type) { case 128: return WKUserScriptData.decode(readValue(buffer)!); - case 129: - return WKUserScriptInjectionTimeEnumData.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); } @@ -1037,32 +1032,20 @@ class _TestWKWebViewHostApiCodec extends StandardMessageCodec { } else if (value is WKFrameInfoData) { buffer.putUint8(136); writeValue(buffer, value.encode()); - } else if (value is WKMediaCaptureTypeData) { - buffer.putUint8(137); - writeValue(buffer, value.encode()); } else if (value is WKNavigationActionData) { - buffer.putUint8(138); - writeValue(buffer, value.encode()); - } else if (value is WKNavigationActionPolicyEnumData) { - buffer.putUint8(139); - writeValue(buffer, value.encode()); - } else if (value is WKPermissionDecisionData) { - buffer.putUint8(140); + buffer.putUint8(137); writeValue(buffer, value.encode()); } else if (value is WKScriptMessageData) { - buffer.putUint8(141); + buffer.putUint8(138); writeValue(buffer, value.encode()); } else if (value is WKSecurityOriginData) { - buffer.putUint8(142); + buffer.putUint8(139); writeValue(buffer, value.encode()); } else if (value is WKUserScriptData) { - buffer.putUint8(143); - writeValue(buffer, value.encode()); - } else if (value is WKUserScriptInjectionTimeEnumData) { - buffer.putUint8(144); + buffer.putUint8(140); writeValue(buffer, value.encode()); } else if (value is WKWebsiteDataTypeEnumData) { - buffer.putUint8(145); + buffer.putUint8(141); writeValue(buffer, value.encode()); } else { super.writeValue(buffer, value); @@ -1091,22 +1074,14 @@ class _TestWKWebViewHostApiCodec extends StandardMessageCodec { case 136: return WKFrameInfoData.decode(readValue(buffer)!); case 137: - return WKMediaCaptureTypeData.decode(readValue(buffer)!); - case 138: return WKNavigationActionData.decode(readValue(buffer)!); - case 139: - return WKNavigationActionPolicyEnumData.decode(readValue(buffer)!); - case 140: - return WKPermissionDecisionData.decode(readValue(buffer)!); - case 141: + case 138: return WKScriptMessageData.decode(readValue(buffer)!); - case 142: + case 139: return WKSecurityOriginData.decode(readValue(buffer)!); - case 143: + case 140: return WKUserScriptData.decode(readValue(buffer)!); - case 144: - return WKUserScriptInjectionTimeEnumData.decode(readValue(buffer)!); - case 145: + case 141: return WKWebsiteDataTypeEnumData.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); diff --git a/packages/webview_flutter/webview_flutter_wkwebview/test/src/foundation/foundation_test.dart b/packages/webview_flutter/webview_flutter_wkwebview/test/src/foundation/foundation_test.dart index ea2e37e2cdad..bb48d94efc12 100644 --- a/packages/webview_flutter/webview_flutter_wkwebview/test/src/foundation/foundation_test.dart +++ b/packages/webview_flutter/webview_flutter_wkwebview/test/src/foundation/foundation_test.dart @@ -61,21 +61,21 @@ void main() { }, ); - final List optionsData = + final List optionsData = verify(mockPlatformHostApi.addObserver( instanceManager.getIdentifier(object), instanceManager.getIdentifier(observer), 'aKeyPath', captureAny, - )).captured.single as List; + )).captured.single as List; expect(optionsData, hasLength(2)); expect( - optionsData[0]!.value, + optionsData[0], NSKeyValueObservingOptionsEnum.initialValue, ); expect( - optionsData[1]!.value, + optionsData[1], NSKeyValueObservingOptionsEnum.priorNotification, ); }); diff --git a/packages/webview_flutter/webview_flutter_wkwebview/test/src/web_kit/web_kit_test.dart b/packages/webview_flutter/webview_flutter_wkwebview/test/src/web_kit/web_kit_test.dart index 055f342ab786..95ad22e94f2e 100644 --- a/packages/webview_flutter/webview_flutter_wkwebview/test/src/web_kit/web_kit_test.dart +++ b/packages/webview_flutter/webview_flutter_wkwebview/test/src/web_kit/web_kit_test.dart @@ -122,11 +122,11 @@ void main() { captureAny, 5.0, )).captured; - final List typeData = + final List typeData = (capturedArgs.single as List) - .cast(); + .cast(); - expect(typeData.single.value, WKWebsiteDataTypeEnum.cookies); + expect(typeData.single, WKWebsiteDataTypeEnum.cookies); }); }); @@ -458,15 +458,15 @@ void main() { }, ); - final List typeData = verify( + final List typeData = verify( mockPlatformHostApi.setMediaTypesRequiringUserActionForPlayback( instanceManager.getIdentifier(webViewConfiguration), captureAny, - )).captured.single as List; + )).captured.single as List; expect(typeData, hasLength(2)); - expect(typeData[0]!.value, WKAudiovisualMediaTypeEnum.audio); - expect(typeData[1]!.value, WKAudiovisualMediaTypeEnum.video); + expect(typeData[0], WKAudiovisualMediaTypeEnum.audio); + expect(typeData[1], WKAudiovisualMediaTypeEnum.video); }); }); @@ -575,9 +575,9 @@ void main() { }, ); - final WKNavigationActionPolicyEnumData policyData = - await WebKitFlutterApis.instance.navigationDelegate - .decidePolicyForNavigationAction( + final WKNavigationActionPolicyEnum policyData = await WebKitFlutterApis + .instance.navigationDelegate + .decidePolicyForNavigationAction( instanceManager.getIdentifier(navigationDelegate)!, instanceManager.getIdentifier(webView)!, WKNavigationActionData( @@ -590,7 +590,7 @@ void main() { ), ); - expect(policyData.value, WKNavigationActionPolicyEnum.cancel); + expect(policyData, WKNavigationActionPolicyEnum.cancel); }); test('didFailNavigation', () async { @@ -1010,7 +1010,7 @@ void main() { protocol: origin.protocol, ), WKFrameInfoData(isMainFrame: frame.isMainFrame), - WKMediaCaptureTypeData(value: type), + type, ); expect(callbackParameters, [