diff --git a/.ci/flutter_master.version b/.ci/flutter_master.version index fb5dec2eaa0..61ae1d52920 100644 --- a/.ci/flutter_master.version +++ b/.ci/flutter_master.version @@ -1 +1 @@ -ed553d10cf6370065c12d372027ff2d0cf621cf1 +0e2d55e0e7b2ebb8003ebb6519f43006f758b36f diff --git a/packages/file_selector/file_selector_android/CHANGELOG.md b/packages/file_selector/file_selector_android/CHANGELOG.md index 8c1f93d36d3..ca3067927f5 100644 --- a/packages/file_selector/file_selector_android/CHANGELOG.md +++ b/packages/file_selector/file_selector_android/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.5.1+11 + +* Bumps androidx.annotation:annotation from 1.9.0 to 1.9.1. + ## 0.5.1+10 * Bumps androidx.annotation:annotation from 1.8.2 to 1.9.0. diff --git a/packages/file_selector/file_selector_android/android/build.gradle b/packages/file_selector/file_selector_android/android/build.gradle index 144e667a2d6..7fd42103b6b 100644 --- a/packages/file_selector/file_selector_android/android/build.gradle +++ b/packages/file_selector/file_selector_android/android/build.gradle @@ -35,7 +35,7 @@ android { } dependencies { - implementation 'androidx.annotation:annotation:1.9.0' + implementation 'androidx.annotation:annotation:1.9.1' testImplementation 'junit:junit:4.13.2' testImplementation 'org.mockito:mockito-inline:5.1.0' testImplementation 'androidx.test:core:1.3.0' diff --git a/packages/file_selector/file_selector_android/pubspec.yaml b/packages/file_selector/file_selector_android/pubspec.yaml index 389fa903eb0..76087f64197 100644 --- a/packages/file_selector/file_selector_android/pubspec.yaml +++ b/packages/file_selector/file_selector_android/pubspec.yaml @@ -2,7 +2,7 @@ name: file_selector_android description: Android implementation of the file_selector package. repository: https://github.com/flutter/packages/tree/main/packages/file_selector/file_selector_android issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+file_selector%22 -version: 0.5.1+10 +version: 0.5.1+11 environment: sdk: ^3.5.0 diff --git a/packages/google_identity_services_web/CHANGELOG.md b/packages/google_identity_services_web/CHANGELOG.md index f6d8de6fa0b..74323f88c30 100644 --- a/packages/google_identity_services_web/CHANGELOG.md +++ b/packages/google_identity_services_web/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.3.3 + +* Moves all the JavaScript types to extend `JSObject`. + ## 0.3.2 * Adds the `nonce` parameter to `loadWebSdk`. diff --git a/packages/google_identity_services_web/example/integration_test/js_interop_id_test.dart b/packages/google_identity_services_web/example/integration_test/js_interop_id_test.dart index 1d1c5c29ea8..6c5da4bcd14 100644 --- a/packages/google_identity_services_web/example/integration_test/js_interop_id_test.dart +++ b/packages/google_identity_services_web/example/integration_test/js_interop_id_test.dart @@ -61,25 +61,24 @@ void main() async { utils.createExpectConfigValue(config as JSObject); expectConfigValue('client_id', 'testing_1-2-3'); - expectConfigValue('auto_select', isFalse); + expectConfigValue('auto_select', false); expectConfigValue('callback', utils.isAJs('function')); expectConfigValue('login_uri', 'https://www.example.com/login'); expectConfigValue('native_callback', utils.isAJs('function')); - expectConfigValue('cancel_on_tap_outside', isFalse); - expectConfigValue('allowed_parent_origin', isA>()); + expectConfigValue('cancel_on_tap_outside', false); + expectConfigValue( + 'allowed_parent_origin', ['allowed', 'another']); expectConfigValue('prompt_parent_id', 'some_dom_id'); expectConfigValue('nonce', 's0m3_r4ndOM_vALu3'); expectConfigValue('context', 'signin'); expectConfigValue('state_cookie_domain', 'subdomain.example.com'); expectConfigValue('ux_mode', 'popup'); - expectConfigValue( - 'allowed_parent_origin', ['allowed', 'another']); expectConfigValue( 'intermediate_iframe_close_callback', utils.isAJs('function')); - expectConfigValue('itp_support', isTrue); + expectConfigValue('itp_support', true); expectConfigValue('login_hint', 'login-hint@example.com'); expectConfigValue('hd', 'hd_value'); - expectConfigValue('use_fedcm_for_prompt', isTrue); + expectConfigValue('use_fedcm_for_prompt', true); }); }); diff --git a/packages/google_identity_services_web/example/integration_test/js_interop_oauth_test.dart b/packages/google_identity_services_web/example/integration_test/js_interop_oauth_test.dart index cf243b0859e..b65b5d8a8e3 100644 --- a/packages/google_identity_services_web/example/integration_test/js_interop_oauth_test.dart +++ b/packages/google_identity_services_web/example/integration_test/js_interop_oauth_test.dart @@ -43,9 +43,9 @@ void main() async { expectConfigValue('client_id', 'testing_1-2-3'); expectConfigValue('callback', utils.isAJs('function')); expectConfigValue('scope', 'one two three'); - expectConfigValue('include_granted_scopes', isTrue); + expectConfigValue('include_granted_scopes', true); expectConfigValue('prompt', 'some-prompt'); - expectConfigValue('enable_granular_consent', isTrue); + expectConfigValue('enable_granular_consent', true); expectConfigValue('login_hint', 'login-hint@example.com'); expectConfigValue('hd', 'hd_value'); expectConfigValue('state', 'some-state'); @@ -66,9 +66,9 @@ void main() async { utils.createExpectConfigValue(config as JSObject); expectConfigValue('scope', 'one two three'); - expectConfigValue('include_granted_scopes', isTrue); + expectConfigValue('include_granted_scopes', true); expectConfigValue('prompt', 'some-prompt'); - expectConfigValue('enable_granular_consent', isTrue); + expectConfigValue('enable_granular_consent', true); expectConfigValue('login_hint', 'login-hint@example.com'); expectConfigValue('state', 'some-state'); }); @@ -93,15 +93,15 @@ void main() async { utils.createExpectConfigValue(config as JSObject); expectConfigValue('scope', 'one two three'); - expectConfigValue('include_granted_scopes', isTrue); + expectConfigValue('include_granted_scopes', true); expectConfigValue('redirect_uri', 'https://www.example.com/login'); expectConfigValue('callback', utils.isAJs('function')); expectConfigValue('state', 'some-state'); - expectConfigValue('enable_granular_consent', isTrue); + expectConfigValue('enable_granular_consent', true); expectConfigValue('login_hint', 'login-hint@example.com'); expectConfigValue('hd', 'hd_value'); expectConfigValue('ux_mode', 'popup'); - expectConfigValue('select_account', isTrue); + expectConfigValue('select_account', true); expectConfigValue('error_callback', utils.isAJs('function')); }); }); diff --git a/packages/google_identity_services_web/example/integration_test/utils.dart b/packages/google_identity_services_web/example/integration_test/utils.dart index 2d5c3f3fab8..a75d2d9e9ee 100644 --- a/packages/google_identity_services_web/example/integration_test/utils.dart +++ b/packages/google_identity_services_web/example/integration_test/utils.dart @@ -23,6 +23,20 @@ typedef ExpectConfigValueFn = void Function(String name, Object? matcher); /// Creates a [ExpectConfigValueFn] for the `config` [JSObject]. ExpectConfigValueFn createExpectConfigValue(JSObject config) { return (String name, Object? matcher) { + if (matcher is String) { + matcher = matcher.toJS; + } else if (matcher is bool) { + matcher = matcher.toJS; + } else if (matcher is List) { + final List old = matcher; + matcher = isA().having( + (JSAny? p0) => (p0 as JSArray?) + ?.toDart + .map((JSAny? e) => e.dartify()) + .toList(), + 'Array with matching values', + old); + } expect(config[name], matcher, reason: name); }; } diff --git a/packages/google_identity_services_web/lib/src/js_interop/google_accounts_id.dart b/packages/google_identity_services_web/lib/src/js_interop/google_accounts_id.dart index 99bc70690a4..7679f8fad1d 100644 --- a/packages/google_identity_services_web/lib/src/js_interop/google_accounts_id.dart +++ b/packages/google_identity_services_web/lib/src/js_interop/google_accounts_id.dart @@ -20,12 +20,7 @@ import 'shared.dart'; external GoogleAccountsId get id; /// The Dart definition of the `google.accounts.id` global. -@JS() -@staticInterop -abstract class GoogleAccountsId {} - -/// The `google.accounts.id` methods -extension GoogleAccountsIdExtension on GoogleAccountsId { +extension type GoogleAccountsId._(JSObject _) implements JSObject { /// An undocumented method. /// /// Try it with 'debug'. @@ -186,10 +181,7 @@ extension GoogleAccountsIdExtension on GoogleAccountsId { /// /// Data type: IdConfiguration /// https://developers.google.com/identity/gsi/web/reference/js-reference#IdConfiguration -@JS() -@anonymous -@staticInterop -abstract class IdConfiguration { +extension type IdConfiguration._(JSObject _) implements JSObject { /// Constructs a IdConfiguration object in JavaScript. factory IdConfiguration({ /// Your application's client ID, which is found and created in the Google @@ -355,12 +347,7 @@ typedef PromptMomentListenerFn = void Function(PromptMomentNotification moment); /// /// Data type: PromptMomentNotification /// https://developers.google.com/identity/gsi/web/reference/js-reference#PromptMomentNotification -@JS() -@staticInterop -abstract class PromptMomentNotification {} - -/// The methods of the [PromptMomentNotification] data type: -extension PromptMomentNotificationExtension on PromptMomentNotification { +extension type PromptMomentNotification._(JSObject _) implements JSObject { /// Is this notification for a display moment? bool isDisplayMoment() => _isDisplayMoment().toDart; @JS('isDisplayMoment') @@ -415,12 +402,7 @@ extension PromptMomentNotificationExtension on PromptMomentNotification { /// /// Data type: CredentialResponse /// https://developers.google.com/identity/gsi/web/reference/js-reference#CredentialResponse -@JS() -@staticInterop -abstract class CredentialResponse {} - -/// The fields that are contained in the credential response object. -extension CredentialResponseExtension on CredentialResponse { +extension type CredentialResponse._(JSObject _) implements JSObject { /// The ClientID for this Credential. String? get client_id => _client_id?.toDart; @JS('client_id') @@ -469,10 +451,7 @@ typedef CallbackFn = void Function(CredentialResponse credentialResponse); /// /// Data type: GsiButtonConfiguration /// https://developers.google.com/identity/gsi/web/reference/js-reference#GsiButtonConfiguration -@JS() -@anonymous -@staticInterop -abstract class GsiButtonConfiguration { +extension type GsiButtonConfiguration._(JSObject _) implements JSObject { /// Constructs an options object for the [renderButton] method. factory GsiButtonConfiguration({ /// The button type. @@ -535,12 +514,7 @@ abstract class GsiButtonConfiguration { } /// The object passed as an optional parameter to `click_listener` function. -@JS() -@staticInterop -abstract class GsiButtonData {} - -/// The fields that are contained in the button data. -extension GsiButtonDataExtension on GsiButtonData { +extension type GsiButtonData._(JSObject _) implements JSObject { /// Nonce String? get nonce => _nonce?.toDart; @JS('nonce') @@ -565,10 +539,7 @@ typedef GsiButtonClickListenerFn = void Function(GsiButtonData? gsiButtonData); /// /// Data type: Credential /// https://developers.google.com/identity/gsi/web/reference/js-reference#type-Credential -@JS() -@anonymous -@staticInterop -abstract class Credential { +extension type Credential._(JSObject _) implements JSObject { /// factory Credential({ required String id, @@ -620,12 +591,7 @@ typedef RevocationResponseHandlerFn = void Function( /// /// Data type: RevocationResponse /// https://developers.google.com/identity/gsi/web/reference/js-reference#RevocationResponse -@JS() -@staticInterop -abstract class RevocationResponse {} - -/// The fields that are contained in the [RevocationResponse] object. -extension RevocationResponseExtension on RevocationResponse { +extension type RevocationResponse._(JSObject _) implements JSObject { /// This field is a boolean value set to true if the revoke method call /// succeeded or false on failure. bool get successful => _successful.toDart; diff --git a/packages/google_identity_services_web/lib/src/js_interop/google_accounts_oauth2.dart b/packages/google_identity_services_web/lib/src/js_interop/google_accounts_oauth2.dart index 30a843b07e0..64402069004 100644 --- a/packages/google_identity_services_web/lib/src/js_interop/google_accounts_oauth2.dart +++ b/packages/google_identity_services_web/lib/src/js_interop/google_accounts_oauth2.dart @@ -9,9 +9,6 @@ // * non_constant_identifier_names required to be able to use the same parameter // names as the underlying library. -@JS() -library google_accounts_oauth2; - import 'dart:js_interop'; import 'shared.dart'; @@ -23,12 +20,7 @@ import 'shared.dart'; external GoogleAccountsOauth2 get oauth2; /// The Dart definition of the `google.accounts.oauth2` global. -@JS() -@staticInterop -abstract class GoogleAccountsOauth2 {} - -/// The `google.accounts.oauth2` methods -extension GoogleAccountsOauth2Extension on GoogleAccountsOauth2 { +extension type GoogleAccountsOauth2._(JSObject _) implements JSObject { /// Initializes and returns a code client, with the passed-in [config]. /// /// Method: google.accounts.oauth2.initCodeClient @@ -97,10 +89,7 @@ extension GoogleAccountsOauth2Extension on GoogleAccountsOauth2 { /// /// Data type: CodeClientConfig /// https://developers.google.com/identity/oauth2/web/reference/js-reference#CodeClientConfig -@JS() -@anonymous -@staticInterop -abstract class CodeClientConfig { +extension type CodeClientConfig._(JSObject _) implements JSObject { /// Constructs a CodeClientConfig object in JavaScript. /// /// The [callback] property must be a Dart function and not a JS function. @@ -161,12 +150,7 @@ abstract class CodeClientConfig { /// /// Data type: CodeClient /// https://developers.google.com/identity/oauth2/web/reference/js-reference#CodeClient -@JS() -@staticInterop -abstract class CodeClient {} - -/// The methods available on the [CodeClient]. -extension CodeClientExtension on CodeClient { +extension type CodeClient._(JSObject _) implements JSObject { /// Starts the OAuth 2.0 Code UX flow. external void requestCode(); } @@ -175,12 +159,7 @@ extension CodeClientExtension on CodeClient { /// /// Data type: CodeResponse /// https://developers.google.com/identity/oauth2/web/reference/js-reference#CodeResponse -@JS() -@staticInterop -abstract class CodeResponse {} - -/// The fields that are contained in the code response object. -extension CodeResponseExtension on CodeResponse { +extension type CodeResponse._(JSObject _) implements JSObject { /// The authorization code of a successful token response. String? get code => _code?.toDart; @JS('code') @@ -223,10 +202,7 @@ typedef CodeClientCallbackFn = void Function(CodeResponse response); /// /// Data type: TokenClientConfig /// https://developers.google.com/identity/oauth2/web/reference/js-reference#TokenClientConfig -@JS() -@anonymous -@staticInterop -abstract class TokenClientConfig { +extension type TokenClientConfig._(JSObject _) implements JSObject { /// Constructs a TokenClientConfig object in JavaScript. /// /// The [callback] property must be a Dart function and not a JS function. @@ -281,12 +257,7 @@ abstract class TokenClientConfig { /// /// Data type: TokenClient /// https://developers.google.com/identity/oauth2/web/reference/js-reference#TokenClient -@JS() -@staticInterop -abstract class TokenClient {} - -/// The methods available on the [TokenClient]. -extension TokenClientExtension on TokenClient { +extension type TokenClient._(JSObject _) implements JSObject { /// Starts the OAuth 2.0 Code UX flow. void requestAccessToken([ OverridableTokenClientConfig? overrideConfig, @@ -308,10 +279,7 @@ extension TokenClientExtension on TokenClient { /// /// Data type: OverridableTokenClientConfig /// https://developers.google.com/identity/oauth2/web/reference/js-reference#OverridableTokenClientConfig -@JS() -@anonymous -@staticInterop -abstract class OverridableTokenClientConfig { +extension type OverridableTokenClientConfig._(JSObject _) implements JSObject { /// Constructs an OverridableTokenClientConfig object in JavaScript. factory OverridableTokenClientConfig({ /// A list of scopes that identify the resources that your application could @@ -396,12 +364,7 @@ abstract class OverridableTokenClientConfig { /// /// Data type: TokenResponse /// https://developers.google.com/identity/oauth2/web/reference/js-reference#TokenResponse -@JS() -@staticInterop -abstract class TokenResponse {} - -/// The fields that are contained in the code response object. -extension TokenResponseExtension on TokenResponse { +extension type TokenResponse._(JSObject _) implements JSObject { /// The access token of a successful token response. String? get access_token => _access_token?.toDart; @JS('access_token') @@ -465,12 +428,7 @@ typedef TokenClientCallbackFn = void Function(TokenResponse response); typedef ErrorCallbackFn = void Function(GoogleIdentityServicesError? error); /// An error returned by `initTokenClient` or `initDataClient`. -@JS() -@staticInterop -abstract class GoogleIdentityServicesError {} - -/// Methods of the GoogleIdentityServicesError object. -extension GoogleIdentityServicesErrorExtension on GoogleIdentityServicesError { +extension type GoogleIdentityServicesError._(JSObject _) implements JSObject { /// The type of error GoogleIdentityServicesErrorType get type => GoogleIdentityServicesErrorType.values.byName(_type.toDart); @@ -492,12 +450,7 @@ typedef RevokeTokenDoneFn = void Function(TokenRevocationResponse response); /// /// Data type: RevocationResponse /// https://developers.google.com/identity/oauth2/web/reference/js-reference#TokenResponse -@JS() -@staticInterop -abstract class TokenRevocationResponse {} - -/// The fields that are contained in the [TokenRevocationResponse] object. -extension TokenRevocationResponseExtension on TokenRevocationResponse { +extension type TokenRevocationResponse._(JSObject _) implements JSObject { /// This field is a boolean value set to true if the revoke method call /// succeeded or false on failure. bool get successful => _successful.toDart; diff --git a/packages/google_identity_services_web/lib/src/js_interop/load_callback.dart b/packages/google_identity_services_web/lib/src/js_interop/load_callback.dart index 23b08447b8b..f48f8aa0203 100644 --- a/packages/google_identity_services_web/lib/src/js_interop/load_callback.dart +++ b/packages/google_identity_services_web/lib/src/js_interop/load_callback.dart @@ -5,8 +5,6 @@ // Methods here are documented in the Google Identity authentication website, // but they don't really belong to either the authentication nor authorization // libraries. -@JS() -library id_load_callback; import 'dart:js_interop'; @@ -18,7 +16,6 @@ import 'shared.dart'; */ @JS('onGoogleLibraryLoad') -@staticInterop external set _onGoogleLibraryLoad(JSFunction callback); /// Method called after the Sign In With Google JavaScript library is loaded. diff --git a/packages/google_identity_services_web/pubspec.yaml b/packages/google_identity_services_web/pubspec.yaml index 97af6ef049f..cedb0e5b194 100644 --- a/packages/google_identity_services_web/pubspec.yaml +++ b/packages/google_identity_services_web/pubspec.yaml @@ -2,7 +2,7 @@ name: google_identity_services_web description: A Dart JS-interop layer for Google Identity Services. Google's new sign-in SDK for Web that supports multiple types of credentials. repository: https://github.com/flutter/packages/tree/main/packages/google_identity_services_web issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+google_identiy_services_web%22 -version: 0.3.2 +version: 0.3.3 environment: sdk: ^3.4.0 diff --git a/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md index c809dfb10f8..75614efbf0d 100644 --- a/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md @@ -1,6 +1,7 @@ -## NEXT +## 2.10.0 -* Updates minimum supported SDK version to Flutter 3.19/Dart 3.3. +* Updates minimum supported SDK version to Flutter 3.22/Dart 3.4. +* Fixes detection of WebAssembly support on package site. ## 2.9.0 diff --git a/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart b/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart index 5c3bb49133c..66952bbe062 100644 --- a/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart +++ b/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart @@ -5,7 +5,6 @@ library google_maps_flutter; import 'dart:async'; -import 'dart:io'; import 'package:flutter/foundation.dart'; import 'package:flutter/gestures.dart'; diff --git a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart index d93a9c9cc1a..888195ca36d 100644 --- a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart @@ -594,7 +594,6 @@ class _GoogleMapState extends State { /// Builds a [MapConfiguration] from the given [map]. MapConfiguration _configurationFromMapWidget(GoogleMap map) { - assert(!map.liteModeEnabled || Platform.isAndroid); return MapConfiguration( webGestureHandling: map.webGestureHandling, compassEnabled: map.compassEnabled, diff --git a/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml index 00a53387487..661ed9b8d3c 100644 --- a/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml @@ -2,7 +2,7 @@ name: google_maps_flutter description: A Flutter plugin for integrating Google Maps in iOS and Android applications. repository: https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22 -version: 2.9.0 +version: 2.10.0 environment: sdk: ^3.4.0 diff --git a/packages/interactive_media_ads/android/build.gradle b/packages/interactive_media_ads/android/build.gradle index 9c57c1ff7ce..7025e94aed9 100644 --- a/packages/interactive_media_ads/android/build.gradle +++ b/packages/interactive_media_ads/android/build.gradle @@ -52,7 +52,7 @@ android { implementation 'com.google.ads.interactivemedia.v3:interactivemedia:3.35.1' testImplementation 'junit:junit:4.13.2' testImplementation 'org.jetbrains.kotlin:kotlin-test' - testImplementation "org.mockito.kotlin:mockito-kotlin:4.1.0" + testImplementation "org.mockito.kotlin:mockito-kotlin:5.4.0" testImplementation 'org.mockito:mockito-inline:5.1.0' testImplementation 'androidx.test:core:1.3.0' } diff --git a/packages/web_benchmarks/CHANGELOG.md b/packages/web_benchmarks/CHANGELOG.md index 0c85d439909..934507cfbde 100644 --- a/packages/web_benchmarks/CHANGELOG.md +++ b/packages/web_benchmarks/CHANGELOG.md @@ -1,3 +1,8 @@ +## 4.0.0 + +* **Breaking change:** Removes `CompilationOptions.renderer` and the + `WebRenderer` enum. + ## 3.1.1 * Adds `missing_code_block_language_in_doc_comment` lint. diff --git a/packages/web_benchmarks/lib/src/compilation_options.dart b/packages/web_benchmarks/lib/src/compilation_options.dart index 30a349c2520..0a02a8ecbff 100644 --- a/packages/web_benchmarks/lib/src/compilation_options.dart +++ b/packages/web_benchmarks/lib/src/compilation_options.dart @@ -8,35 +8,16 @@ /// should be built. class CompilationOptions { /// Creates a [CompilationOptions] object that compiles to JavaScript. - const CompilationOptions.js({ - this.renderer = WebRenderer.canvaskit, - }) : useWasm = false; + const CompilationOptions.js() : useWasm = false; /// Creates a [CompilationOptions] object that compiles to WebAssembly. - const CompilationOptions.wasm() - : useWasm = true, - renderer = WebRenderer.skwasm; - - /// The renderer to use for the build. - final WebRenderer renderer; + const CompilationOptions.wasm() : useWasm = true; /// Whether to build the app with dart2wasm. final bool useWasm; @override String toString() { - return '(renderer: ${renderer.name}, compiler: ${useWasm ? 'dart2wasm' : 'dart2js'})'; + return '(compiler: ${useWasm ? 'dart2wasm' : 'dart2js'})'; } } - -/// The possible types of web renderers Flutter can build for. -enum WebRenderer { - /// The HTML web renderer. - html, - - /// The CanvasKit web renderer. - canvaskit, - - /// The SKIA Wasm web renderer. - skwasm, -} diff --git a/packages/web_benchmarks/lib/src/runner.dart b/packages/web_benchmarks/lib/src/runner.dart index 4e52a88f61a..9a1eb231fe5 100644 --- a/packages/web_benchmarks/lib/src/runner.dart +++ b/packages/web_benchmarks/lib/src/runner.dart @@ -141,8 +141,7 @@ class BenchmarkServer { if (compilationOptions.useWasm) ...[ '--wasm', '--no-strip-wasm', - ] else - '--web-renderer=${compilationOptions.renderer.name}', + ], '--dart-define=FLUTTER_WEB_ENABLE_PROFILING=true', if (!treeShakeIcons) '--no-tree-shake-icons', '--profile', diff --git a/packages/web_benchmarks/pubspec.yaml b/packages/web_benchmarks/pubspec.yaml index 1fdc26d8201..ed3ca89f9ff 100644 --- a/packages/web_benchmarks/pubspec.yaml +++ b/packages/web_benchmarks/pubspec.yaml @@ -2,7 +2,7 @@ name: web_benchmarks description: A benchmark harness for performance-testing Flutter apps in Chrome. repository: https://github.com/flutter/packages/tree/main/packages/web_benchmarks issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+web_benchmarks%22 -version: 3.1.1 +version: 4.0.0 environment: sdk: ^3.3.0