From 5e4e7997b377a262f70e39555c2ab631bd92e2be Mon Sep 17 00:00:00 2001 From: David Iglesias Teixeira Date: Wed, 17 May 2023 13:30:10 -0700 Subject: [PATCH 1/4] [ci] (Manual) Roll Flutter (stable) to d3d8ef (6 revs) --- .ci/flutter_stable.version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/flutter_stable.version b/.ci/flutter_stable.version index 146c21cc78b9..4e463678673b 100644 --- a/.ci/flutter_stable.version +++ b/.ci/flutter_stable.version @@ -1 +1 @@ -84a1e904f44f9b0e9c4510138010edcc653163f8 +d3d8effc686d73e0114d71abdcccef63fa1f25d2 From 87684f4183def2d7d07644355cf862bebb8c5fce Mon Sep 17 00:00:00 2001 From: David Iglesias Teixeira Date: Wed, 17 May 2023 13:25:42 -0700 Subject: [PATCH 2/4] [ci] (Manual) Roll Flutter to d0d1fe (78 revs) --- .ci/flutter_master.version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/flutter_master.version b/.ci/flutter_master.version index 68d3a6d9f76b..f15d86df215b 100644 --- a/.ci/flutter_master.version +++ b/.ci/flutter_master.version @@ -1 +1 @@ -a76dbe44b99ef54515169a48c70a8ba8db1cb0e1 +d0d1feb6283f4e812e9784b40409f732a068ff76 From 4075ac489af0915bfc7bc0919c3c06f2025d0f41 Mon Sep 17 00:00:00 2001 From: David Iglesias Teixeira Date: Wed, 17 May 2023 13:23:20 -0700 Subject: [PATCH 3/4] [flutter_markdown] Add AssetManifest.smcbin to tests. --- packages/flutter_markdown/test/utils.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/flutter_markdown/test/utils.dart b/packages/flutter_markdown/test/utils.dart index 6463a97a9396..0ce7f162b3a9 100644 --- a/packages/flutter_markdown/test/utils.dart +++ b/packages/flutter_markdown/test/utils.dart @@ -192,6 +192,10 @@ class TestAssetBundle extends CachingAssetBundle { final ByteData manifest = const StandardMessageCodec().encodeMessage( >{'assets/logo.png': []})!; return Future.value(manifest); + } else if (key == 'AssetManifest.smcbin') { + final ByteData manifest = const StandardMessageCodec().encodeMessage( + >{'assets/logo.png': []})!; + return Future.value(manifest); } else if (key == 'assets/logo.png') { // The root directory tests are run from is different for 'flutter test' // verses 'flutter test test/*_test.dart'. Adjust the root directory From 042844084913957d7549dc21a9ac99a04efc324f Mon Sep 17 00:00:00 2001 From: David Iglesias Teixeira Date: Wed, 17 May 2023 15:43:45 -0700 Subject: [PATCH 4/4] [ci] adopt new dart format --- .../lib/google_sign_in_web.dart | 9 +++------ .../lib/src/android_proxy.dart | 2 +- .../lib/src/android_webview_controller.dart | 18 ++++++++---------- .../lib/src/legacy/webview_android_widget.dart | 16 ++++++---------- .../test/android_webview_controller_test.dart | 2 +- .../lib/src/web_webview_controller.dart | 2 +- 6 files changed, 20 insertions(+), 29 deletions(-) diff --git a/packages/google_sign_in/google_sign_in_web/lib/google_sign_in_web.dart b/packages/google_sign_in/google_sign_in_web/lib/google_sign_in_web.dart index 72197f092120..b436a983fc70 100644 --- a/packages/google_sign_in/google_sign_in_web/lib/google_sign_in_web.dart +++ b/packages/google_sign_in/google_sign_in_web/lib/google_sign_in_web.dart @@ -47,13 +47,10 @@ class GoogleSignInPlugin extends GoogleSignInPlatform { /// For tests, the plugin can skip its loading process with [debugOverrideLoader], /// and the implementation of the underlying GIS SDK client through [debugOverrideGisSdkClient]. GoogleSignInPlugin({ + @visibleForTesting bool debugOverrideLoader = false, + @visibleForTesting GisSdkClient? debugOverrideGisSdkClient, @visibleForTesting - bool debugOverrideLoader = false, - @visibleForTesting - GisSdkClient? debugOverrideGisSdkClient, - @visibleForTesting - StreamController? - debugOverrideUserDataController, + StreamController? debugOverrideUserDataController, }) : _gisSdkClient = debugOverrideGisSdkClient, _userDataController = debugOverrideUserDataController ?? StreamController.broadcast() { diff --git a/packages/webview_flutter/webview_flutter_android/lib/src/android_proxy.dart b/packages/webview_flutter/webview_flutter_android/lib/src/android_proxy.dart index 8182a42f4b7a..6cbb932532aa 100644 --- a/packages/webview_flutter/webview_flutter_android/lib/src/android_proxy.dart +++ b/packages/webview_flutter/webview_flutter_android/lib/src/android_proxy.dart @@ -51,7 +51,7 @@ class AndroidWebViewProxy { android_webview.WebResourceError error, )? onReceivedRequestError, @Deprecated('Only called on Android version < 23.') - void Function( + void Function( android_webview.WebView webView, int errorCode, String description, diff --git a/packages/webview_flutter/webview_flutter_android/lib/src/android_webview_controller.dart b/packages/webview_flutter/webview_flutter_android/lib/src/android_webview_controller.dart index c2b1e9a466ae..67df53835d85 100644 --- a/packages/webview_flutter/webview_flutter_android/lib/src/android_webview_controller.dart +++ b/packages/webview_flutter/webview_flutter_android/lib/src/android_webview_controller.dart @@ -43,9 +43,8 @@ class AndroidWebViewControllerCreationParams // ignore: avoid_unused_constructor_parameters PlatformWebViewControllerCreationParams params, { @visibleForTesting - AndroidWebViewProxy androidWebViewProxy = const AndroidWebViewProxy(), - @visibleForTesting - android_webview.WebStorage? androidWebStorage, + AndroidWebViewProxy androidWebViewProxy = const AndroidWebViewProxy(), + @visibleForTesting android_webview.WebStorage? androidWebStorage, }) { return AndroidWebViewControllerCreationParams( androidWebViewProxy: androidWebViewProxy, @@ -195,7 +194,7 @@ class AndroidWebViewController extends PlatformWebViewController { static Future enableDebugging( bool enabled, { @visibleForTesting - AndroidWebViewProxy webViewProxy = const AndroidWebViewProxy(), + AndroidWebViewProxy webViewProxy = const AndroidWebViewProxy(), }) { return webViewProxy.setWebContentsDebuggingEnabled(enabled); } @@ -550,7 +549,7 @@ class AndroidJavaScriptChannelParams extends JavaScriptChannelParams { required super.name, required super.onMessageReceived, @visibleForTesting - AndroidWebViewProxy webViewProxy = const AndroidWebViewProxy(), + AndroidWebViewProxy webViewProxy = const AndroidWebViewProxy(), }) : assert(name.isNotEmpty), _javaScriptChannel = webViewProxy.createJavaScriptChannel( name, @@ -575,7 +574,7 @@ class AndroidJavaScriptChannelParams extends JavaScriptChannelParams { AndroidJavaScriptChannelParams.fromJavaScriptChannelParams( JavaScriptChannelParams params, { @visibleForTesting - AndroidWebViewProxy webViewProxy = const AndroidWebViewProxy(), + AndroidWebViewProxy webViewProxy = const AndroidWebViewProxy(), }) : this( name: params.name, onMessageReceived: params.onMessageReceived, @@ -600,10 +599,9 @@ class AndroidWebViewWidgetCreationParams super.layoutDirection, super.gestureRecognizers, this.displayWithHybridComposition = false, + @visibleForTesting InstanceManager? instanceManager, @visibleForTesting - InstanceManager? instanceManager, - @visibleForTesting - this.platformViewsServiceProxy = const PlatformViewsServiceProxy(), + this.platformViewsServiceProxy = const PlatformViewsServiceProxy(), }) : instanceManager = instanceManager ?? android_webview.JavaObject.globalInstanceManager; @@ -801,7 +799,7 @@ class AndroidNavigationDelegateCreationParams // ignore: avoid_unused_constructor_parameters PlatformNavigationDelegateCreationParams params, { @visibleForTesting - AndroidWebViewProxy androidWebViewProxy = const AndroidWebViewProxy(), + AndroidWebViewProxy androidWebViewProxy = const AndroidWebViewProxy(), }) { return AndroidNavigationDelegateCreationParams._( androidWebViewProxy: androidWebViewProxy, diff --git a/packages/webview_flutter/webview_flutter_android/lib/src/legacy/webview_android_widget.dart b/packages/webview_flutter/webview_flutter_android/lib/src/legacy/webview_android_widget.dart index 8ae5ab0cecec..ef9545427ef1 100644 --- a/packages/webview_flutter/webview_flutter_android/lib/src/legacy/webview_android_widget.dart +++ b/packages/webview_flutter/webview_flutter_android/lib/src/legacy/webview_android_widget.dart @@ -22,12 +22,10 @@ class WebViewAndroidWidget extends StatefulWidget { required this.callbacksHandler, required this.javascriptChannelRegistry, required this.onBuildWidget, + @visibleForTesting this.webViewProxy = const WebViewProxy(), @visibleForTesting - this.webViewProxy = const WebViewProxy(), - @visibleForTesting - this.flutterAssetManager = const android_webview.FlutterAssetManager(), - @visibleForTesting - this.webStorage, + this.flutterAssetManager = const android_webview.FlutterAssetManager(), + @visibleForTesting this.webStorage, }); /// Initial parameters used to setup the WebView. @@ -89,12 +87,10 @@ class WebViewAndroidPlatformController extends WebViewPlatformController { required CreationParams creationParams, required this.callbacksHandler, required this.javascriptChannelRegistry, + @visibleForTesting this.webViewProxy = const WebViewProxy(), @visibleForTesting - this.webViewProxy = const WebViewProxy(), - @visibleForTesting - this.flutterAssetManager = const android_webview.FlutterAssetManager(), - @visibleForTesting - android_webview.WebStorage? webStorage, + this.flutterAssetManager = const android_webview.FlutterAssetManager(), + @visibleForTesting android_webview.WebStorage? webStorage, }) : webStorage = webStorage ?? android_webview.WebStorage.instance, assert(creationParams.webSettings?.hasNavigationDelegate != null), super(callbacksHandler) { diff --git a/packages/webview_flutter/webview_flutter_android/test/android_webview_controller_test.dart b/packages/webview_flutter/webview_flutter_android/test/android_webview_controller_test.dart index accd4db9ad32..6fb230322172 100644 --- a/packages/webview_flutter/webview_flutter_android/test/android_webview_controller_test.dart +++ b/packages/webview_flutter/webview_flutter_android/test/android_webview_controller_test.dart @@ -97,7 +97,7 @@ void main() { void Function(android_webview.WebView webView, String url)? onPageStarted, @Deprecated('Only called on Android version < 23.') - void Function( + void Function( android_webview.WebView webView, int errorCode, String description, diff --git a/packages/webview_flutter/webview_flutter_web/lib/src/web_webview_controller.dart b/packages/webview_flutter/webview_flutter_web/lib/src/web_webview_controller.dart index 52f93f911e40..daf186191a03 100644 --- a/packages/webview_flutter/webview_flutter_web/lib/src/web_webview_controller.dart +++ b/packages/webview_flutter/webview_flutter_web/lib/src/web_webview_controller.dart @@ -28,7 +28,7 @@ class WebWebViewControllerCreationParams // ignore: avoid_unused_constructor_parameters PlatformWebViewControllerCreationParams params, { @visibleForTesting - HttpRequestFactory httpRequestFactory = const HttpRequestFactory(), + HttpRequestFactory httpRequestFactory = const HttpRequestFactory(), }) : this(httpRequestFactory: httpRequestFactory); static int _nextIFrameId = 0;