diff --git a/analysis_options.yaml b/analysis_options.yaml index 2156d3804df6..d384eac0e616 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -6,7 +6,6 @@ include: all_lint_rules.yaml analyzer: # TODO(rrousselGit): disable implicit-cast/implicit-dynamic errors: - import_of_legacy_library_into_null_safe: ignore # Otherwise cause the import of all_lint_rules to warn because of some rules conflicts. # We explicitly enabled even conflicting rules and are fixing the conflict # in this file @@ -43,6 +42,8 @@ linter: prefer_mixin: false public_member_api_docs: false + invalid_runtime_check_with_js_interop_types: true + ############# # Far too verbose, and not that big of a deal when using parameter_assignments diff --git a/packages/_flutterfire_internals/pubspec.yaml b/packages/_flutterfire_internals/pubspec.yaml index 2e4a2093c68c..e69f3b968cfe 100755 --- a/packages/_flutterfire_internals/pubspec.yaml +++ b/packages/_flutterfire_internals/pubspec.yaml @@ -5,7 +5,7 @@ repository: https://github.com/firebase/flutterfire/tree/master/packages/_flutte version: 1.3.35 environment: - sdk: '>=3.2.0 <4.0.0' + sdk: ^3.4.0 flutter: '>=3.3.0' dependencies: diff --git a/packages/cloud_firestore/cloud_firestore_web/lib/src/interop/firestore.dart b/packages/cloud_firestore/cloud_firestore_web/lib/src/interop/firestore.dart index 7f05e9e5e41c..a9bc71a3000a 100644 --- a/packages/cloud_firestore/cloud_firestore_web/lib/src/interop/firestore.dart +++ b/packages/cloud_firestore/cloud_firestore_web/lib/src/interop/firestore.dart @@ -257,11 +257,11 @@ class LoadBundleTaskProgress LoadBundleTaskProgress._fromJsObject( firestore_interop.LoadBundleTaskProgressJsImpl jsObject, ) : taskState = convertToTaskState(jsObject.taskState.toDart.toLowerCase()), - bytesLoaded = jsObject.bytesLoaded is JSNumber + bytesLoaded = jsObject.bytesLoaded.isA() ? (jsObject.bytesLoaded as JSNumber).toDartInt : int.parse((jsObject.bytesLoaded as JSString).toDart), documentsLoaded = jsObject.documentsLoaded.toDartInt, - totalBytes = jsObject.totalBytes is JSNumber + totalBytes = jsObject.totalBytes.isA() ? (jsObject.totalBytes as JSNumber).toDartInt : int.parse((jsObject.totalBytes as JSString).toDart), totalDocuments = jsObject.totalDocuments.toDartInt, diff --git a/packages/cloud_firestore/cloud_firestore_web/lib/src/interop/firestore_interop.dart b/packages/cloud_firestore/cloud_firestore_web/lib/src/interop/firestore_interop.dart index b1c4890235b4..ffbdb9b4256f 100644 --- a/packages/cloud_firestore/cloud_firestore_web/lib/src/interop/firestore_interop.dart +++ b/packages/cloud_firestore/cloud_firestore_web/lib/src/interop/firestore_interop.dart @@ -396,16 +396,9 @@ extension FieldPathExtension on FieldPath { } @JS('GeoPoint') -@staticInterop -external GeoPointJsImpl get GeoPointConstructor; - -@JS('GeoPoint') -@staticInterop -class GeoPointJsImpl { +extension type GeoPointJsImpl._(JSObject _) implements JSObject { external factory GeoPointJsImpl(JSNumber latitude, JSNumber longitude); -} -extension GeoPointJsImplExtension on GeoPointJsImpl { /// The latitude of this GeoPoint instance. external JSNumber get latitude; @@ -417,19 +410,11 @@ extension GeoPointJsImplExtension on GeoPointJsImpl { } @JS('Bytes') -@staticInterop -external BytesJsImpl get BytesConstructor; - -@JS('Bytes') -@staticInterop -@anonymous -abstract class BytesJsImpl { +extension type BytesJsImpl(JSObject _) implements JSObject { external static BytesJsImpl fromBase64JSString(JSString base64); external static BytesJsImpl fromUint8Array(JSUint8Array list); -} -extension BytesJsImplExtension on BytesJsImpl { external JSString toBase64(); external JSUint8Array toUint8Array(); diff --git a/packages/cloud_firestore/cloud_firestore_web/lib/src/interop/utils/utils.dart b/packages/cloud_firestore/cloud_firestore_web/lib/src/interop/utils/utils.dart index 33d3a5a132de..0b74f4ba2ef6 100644 --- a/packages/cloud_firestore/cloud_firestore_web/lib/src/interop/utils/utils.dart +++ b/packages/cloud_firestore/cloud_firestore_web/lib/src/interop/utils/utils.dart @@ -12,7 +12,7 @@ import '../firestore.dart'; /// Returns Dart representation from JS Object. dynamic dartify(dynamic object) { // Convert JSObject to Dart equivalents directly - if (object is! JSObject) { + if (object.isA()) { return object; } @@ -21,7 +21,7 @@ dynamic dartify(dynamic object) { if (jsObject.instanceof(DocumentReferenceJsConstructor as JSFunction)) { return DocumentReference.getInstance(jsObject as DocumentReferenceJsImpl); } - if (jsObject.instanceof(GeoPointConstructor as JSFunction)) { + if (jsObject.isA()) { return jsObject; } if (jsObject.instanceof(TimestampJsConstructor as JSFunction)) { @@ -29,7 +29,7 @@ dynamic dartify(dynamic object) { return Timestamp( castedJSObject.seconds.toDartInt, castedJSObject.nanoseconds.toDartInt); } - if (jsObject.instanceof(BytesConstructor as JSFunction)) { + if (jsObject.isA()) { return jsObject as BytesJsImpl; } @@ -85,11 +85,12 @@ JSAny? jsify(Object? dartObject) { return jsifyFieldValue(dartObject); } + // ignore: invalid_runtime_check_with_js_interop_types if (dartObject is BytesJsImpl) { return dartObject as JSAny; } - // NOTE: if the firestore JS lib is not imported, we'll get a DDC warning here + // ignore: invalid_runtime_check_with_js_interop_types if (dartObject is GeoPointJsImpl) { return dartObject as JSAny; } diff --git a/packages/cloud_firestore/cloud_firestore_web/lib/src/utils/decode_utility.dart b/packages/cloud_firestore/cloud_firestore_web/lib/src/utils/decode_utility.dart index d434466cc64e..132b900a5956 100644 --- a/packages/cloud_firestore/cloud_firestore_web/lib/src/utils/decode_utility.dart +++ b/packages/cloud_firestore/cloud_firestore_web/lib/src/utils/decode_utility.dart @@ -13,7 +13,7 @@ import 'package:cloud_firestore_web/src/interop/firestore.dart'; import '../interop/firestore.dart' as firestore_interop; /// Class containing static utility methods to decode firestore data. -class DecodeUtility { +abstract final class DecodeUtility { /// Decodes the values on an incoming Map to their proper types. static Map? decodeMapData( Map? data, FirebaseFirestorePlatform firestore) { @@ -35,14 +35,12 @@ class DecodeUtility { /// Decodes an incoming value to its proper type. static dynamic valueDecode( dynamic value, FirebaseFirestorePlatform firestore) { - if (value is JSObject && - value.instanceof(GeoPointConstructor as JSFunction)) { - return GeoPoint((value as GeoPointJsImpl).latitude.toDartDouble, - (value as GeoPointJsImpl).longitude.toDartDouble); + if (value.isA()) { + final val = value! as GeoPointJsImpl; + return GeoPoint(val.latitude.toDartDouble, val.longitude.toDartDouble); } else if (value is DateTime) { return Timestamp.fromDate(value); - } else if (value is JSObject && - value.instanceof(BytesConstructor as JSFunction)) { + } else if (value.isA()) { return Blob((value as BytesJsImpl).toUint8Array().toDart); } else if (value is firestore_interop.DocumentReference) { return (firestore as FirebaseFirestoreWeb).doc(value.path); diff --git a/packages/cloud_firestore/cloud_firestore_web/pubspec.yaml b/packages/cloud_firestore/cloud_firestore_web/pubspec.yaml index ce2e7b3c8a00..7d65ee6dda09 100644 --- a/packages/cloud_firestore/cloud_firestore_web/pubspec.yaml +++ b/packages/cloud_firestore/cloud_firestore_web/pubspec.yaml @@ -6,7 +6,7 @@ repository: https://github.com/firebase/flutterfire/tree/master/packages/cloud_f version: 3.12.5 environment: - sdk: '>=3.2.0 <4.0.0' + sdk: ^3.4.0 flutter: '>=3.3.0' dependencies: diff --git a/packages/cloud_functions/cloud_functions_web/lib/interop/functions.dart b/packages/cloud_functions/cloud_functions_web/lib/interop/functions.dart index a5af9f909b04..70ac693a43e3 100644 --- a/packages/cloud_functions/cloud_functions_web/lib/interop/functions.dart +++ b/packages/cloud_functions/cloud_functions_web/lib/interop/functions.dart @@ -89,7 +89,7 @@ class HttpsCallable extends JsObjectWrapper { /// Returns Dart representation from JS Object. dynamic _dartify(dynamic object) { // Convert JSObject to Dart equivalents directly - if (object is! JSObject) { + if (object.isA()) { return object; } diff --git a/packages/cloud_functions/cloud_functions_web/pubspec.yaml b/packages/cloud_functions/cloud_functions_web/pubspec.yaml index 7dbf51f7df9d..2ee027bdb27b 100644 --- a/packages/cloud_functions/cloud_functions_web/pubspec.yaml +++ b/packages/cloud_functions/cloud_functions_web/pubspec.yaml @@ -6,7 +6,7 @@ repository: https://github.com/firebase/flutterfire/tree/master/packages/cloud_f version: 4.9.6 environment: - sdk: '>=3.2.0 <4.0.0' + sdk: ^3.4.0 flutter: '>=3.3.0' dependencies: diff --git a/packages/firebase_analytics/firebase_analytics_web/lib/interop/analytics.dart b/packages/firebase_analytics/firebase_analytics_web/lib/interop/analytics.dart index a178e700c712..37fcbc24def4 100644 --- a/packages/firebase_analytics/firebase_analytics_web/lib/interop/analytics.dart +++ b/packages/firebase_analytics/firebase_analytics_web/lib/interop/analytics.dart @@ -34,7 +34,7 @@ class Analytics extends JsObjectWrapper { static Future isSupported() async { final result = await analytics_interop.isSupported().toDart; - return result! as bool; + return (result! as JSBoolean).toDart; } /// Non-null App for this instance of analytics service. diff --git a/packages/firebase_analytics/firebase_analytics_web/pubspec.yaml b/packages/firebase_analytics/firebase_analytics_web/pubspec.yaml index 473037503889..4867673696b6 100644 --- a/packages/firebase_analytics/firebase_analytics_web/pubspec.yaml +++ b/packages/firebase_analytics/firebase_analytics_web/pubspec.yaml @@ -5,7 +5,7 @@ repository: https://github.com/firebase/flutterfire/tree/master/packages/firebas version: 0.5.7+7 environment: - sdk: '>=3.2.0 <4.0.0' + sdk: ^3.4.0 flutter: '>=3.3.0' dependencies: diff --git a/packages/firebase_app_check/firebase_app_check_web/pubspec.yaml b/packages/firebase_app_check/firebase_app_check_web/pubspec.yaml index 52f802789e03..ee6d21b1fe44 100644 --- a/packages/firebase_app_check/firebase_app_check_web/pubspec.yaml +++ b/packages/firebase_app_check/firebase_app_check_web/pubspec.yaml @@ -4,7 +4,7 @@ homepage: https://github.com/firebase/flutterfire/tree/master/packages/firebase_ version: 0.1.2+7 environment: - sdk: '>=3.2.0 <4.0.0' + sdk: ^3.4.0 flutter: '>=3.3.0' dependencies: diff --git a/packages/firebase_app_installations/firebase_app_installations_web/pubspec.yaml b/packages/firebase_app_installations/firebase_app_installations_web/pubspec.yaml index b9dcfe5bf590..942e3ec40189 100644 --- a/packages/firebase_app_installations/firebase_app_installations_web/pubspec.yaml +++ b/packages/firebase_app_installations/firebase_app_installations_web/pubspec.yaml @@ -5,7 +5,7 @@ homepage: https://github.com/firebase/flutterfire/tree/master/packages/firebase_ repository: https://github.com/firebase/flutterfire/tree/master/packages/firebase_app_installations/firebase_app_installations_web environment: - sdk: '>=3.2.0 <4.0.0' + sdk: ^3.4.0 flutter: '>=3.3.0' dependencies: diff --git a/packages/firebase_auth/firebase_auth/pubspec.yaml b/packages/firebase_auth/firebase_auth/pubspec.yaml index 2496268e0f3c..417d6df9824c 100755 --- a/packages/firebase_auth/firebase_auth/pubspec.yaml +++ b/packages/firebase_auth/firebase_auth/pubspec.yaml @@ -10,7 +10,7 @@ false_secrets: - example/** environment: - sdk: '>=3.2.0 <4.0.0' + sdk: ^3.4.0 flutter: '>=3.16.0' dependencies: diff --git a/packages/firebase_auth/firebase_auth_platform_interface/pubspec.yaml b/packages/firebase_auth/firebase_auth_platform_interface/pubspec.yaml index 4abe29447396..e28f81aea402 100644 --- a/packages/firebase_auth/firebase_auth_platform_interface/pubspec.yaml +++ b/packages/firebase_auth/firebase_auth_platform_interface/pubspec.yaml @@ -7,7 +7,7 @@ repository: https://github.com/firebase/flutterfire/tree/master/packages/firebas version: 7.3.0 environment: - sdk: '>=3.2.0 <4.0.0' + sdk: ^3.4.0 flutter: '>=3.16.0' dependencies: diff --git a/packages/firebase_auth/firebase_auth_web/lib/firebase_auth_web.dart b/packages/firebase_auth/firebase_auth_web/lib/firebase_auth_web.dart index 257e866244cb..0770f522113c 100644 --- a/packages/firebase_auth/firebase_auth_web/lib/firebase_auth_web.dart +++ b/packages/firebase_auth/firebase_auth_web/lib/firebase_auth_web.dart @@ -489,8 +489,8 @@ class FirebaseAuthWeb extends FirebaseAuthPlatform { .setItem(getOriginName(delegate.app.name), origin); } } catch (e) { - if (e is auth_interop.AuthError) { - final String code = e.code.toDart; + if ((e as JSObject).isA()) { + final String code = (e as auth_interop.AuthError).code.toDart; // this catches Firebase Error from web that occurs after hot reloading & hot restarting if (code != 'auth/emulator-config-failed') { throw getFirebaseAuthException(e); diff --git a/packages/firebase_auth/firebase_auth_web/lib/src/firebase_auth_web_recaptcha_verifier_factory.dart b/packages/firebase_auth/firebase_auth_web/lib/src/firebase_auth_web_recaptcha_verifier_factory.dart index 90ea2f89a109..116ba413b75e 100644 --- a/packages/firebase_auth/firebase_auth_web/lib/src/firebase_auth_web_recaptcha_verifier_factory.dart +++ b/packages/firebase_auth/firebase_auth_web/lib/src/firebase_auth_web_recaptcha_verifier_factory.dart @@ -154,7 +154,7 @@ class RecaptchaVerifierFactoryWeb extends RecaptchaVerifierFactoryPlatform { @override Future render() async { try { - return (await _delegate.render()).toInt(); + return await _delegate.render(); } catch (e) { throw getFirebaseAuthException(e); } diff --git a/packages/firebase_auth/firebase_auth_web/lib/src/interop/auth.dart b/packages/firebase_auth/firebase_auth_web/lib/src/interop/auth.dart index 2a4ba442da89..5acfc406fdac 100644 --- a/packages/firebase_auth/firebase_auth_web/lib/src/interop/auth.dart +++ b/packages/firebase_auth/firebase_auth_web/lib/src/interop/auth.dart @@ -127,7 +127,7 @@ class User extends UserInfo { Future getIdToken([bool forceRefresh = false]) => jsObject .getIdToken(forceRefresh.toJS) .toDart - .then((value) => value! as String); + .then((value) => (value! as JSString).toDart); /// Links the user account with the given credentials, and returns any /// available additional user information, such as user name. @@ -526,7 +526,7 @@ class Auth extends JsObjectWrapper { Future> fetchSignInMethodsForEmail(String email) => auth_interop .fetchSignInMethodsForEmail(jsObject, email.toJS) .toDart - .then((value) => List.from(value! as List)); + .then((value) => List.from((value! as JSArray).toDart)); /// Checks if an incoming link is a sign-in with email link. bool isSignInWithEmailLink(String emailLink) => @@ -753,7 +753,7 @@ class Auth extends JsObjectWrapper { Future verifyPasswordResetCode(String code) => auth_interop .verifyPasswordResetCode(jsObject, code.toJS) .toDart - .then((value) => value! as String); + .then((value) => (value! as JSString).toDart); } /// Represents an auth provider. @@ -1054,7 +1054,7 @@ class PhoneAuthProvider jsObject .verifyPhoneNumber(phoneOptions, applicationVerifier.jsObject) .toDart - .then((value) => value! as String); + .then((value) => (value! as JSString).toDart); /// Creates a phone auth credential given the verification ID /// from [verifyPhoneNumber] and the [verificationCode] that was sent to the @@ -1081,7 +1081,7 @@ abstract class ApplicationVerifier< /// Returns a Future containing string for a token that can be used to /// assert the validity of a request. Future verify() => - jsObject.verify().toDart.then((value) => value! as String); + jsObject.verify().toDart.then((value) => (value! as JSString).toDart); } /// reCAPTCHA verifier. @@ -1137,8 +1137,8 @@ class RecaptchaVerifier /// Renders the reCAPTCHA widget on the page. /// Returns a Future that resolves with the reCAPTCHA widget ID. - Future render() => - jsObject.render().toDart.then((value) => value! as num); + Future render() => + jsObject.render().toDart.then((value) => (value! as JSNumber).toDartInt); } /// A result from a phone number sign-in, link, or reauthenticate call. diff --git a/packages/firebase_auth/firebase_auth_web/lib/src/interop/auth_interop.dart b/packages/firebase_auth/firebase_auth_web/lib/src/interop/auth_interop.dart index 9af18267e88e..9e48ec0756d3 100644 --- a/packages/firebase_auth/firebase_auth_web/lib/src/interop/auth_interop.dart +++ b/packages/firebase_auth/firebase_auth_web/lib/src/interop/auth_interop.dart @@ -650,14 +650,10 @@ extension UserProfileExtension on UserProfile { external set photoURL(JSString s); } -@JS() -@staticInterop -abstract class AuthError {} - /// An authentication error. /// /// See: . -extension AuthErrorExtension on AuthError { +extension type AuthError(JSObject _) implements JSObject { external JSString get code; external set code(JSString s); external JSString get message; diff --git a/packages/firebase_auth/firebase_auth_web/pubspec.yaml b/packages/firebase_auth/firebase_auth_web/pubspec.yaml index b5c221e81385..80f0f409b135 100644 --- a/packages/firebase_auth/firebase_auth_web/pubspec.yaml +++ b/packages/firebase_auth/firebase_auth_web/pubspec.yaml @@ -5,7 +5,7 @@ repository: https://github.com/firebase/flutterfire/tree/master/packages/firebas version: 5.12.0 environment: - sdk: '>=3.2.0 <4.0.0' + sdk: ^3.4.0 flutter: '>=3.16.0' dependencies: diff --git a/packages/firebase_core/firebase_core_web/lib/src/firebase_core_web.dart b/packages/firebase_core/firebase_core_web/lib/src/firebase_core_web.dart index bca05f6a6b25..6bd44d7201c5 100644 --- a/packages/firebase_core/firebase_core_web/lib/src/firebase_core_web.dart +++ b/packages/firebase_core/firebase_core_web/lib/src/firebase_core_web.dart @@ -87,8 +87,9 @@ class FirebaseCoreWeb extends FirebasePlatform { JSObject? ignored = globalContext.getProperty('flutterfire_ignore_scripts'.toJS); - if (ignored is Iterable) { - return (ignored! as Iterable) + if (ignored.isA()) { + return (ignored! as JSArray) + .toDart .map((e) => e.toString()) .toList(growable: false); } diff --git a/packages/firebase_core/firebase_core_web/pubspec.yaml b/packages/firebase_core/firebase_core_web/pubspec.yaml index 92ad04d83453..fd140e9cf63d 100644 --- a/packages/firebase_core/firebase_core_web/pubspec.yaml +++ b/packages/firebase_core/firebase_core_web/pubspec.yaml @@ -5,7 +5,7 @@ repository: https://github.com/firebase/flutterfire/tree/master/packages/firebas version: 2.17.0 environment: - sdk: '>=3.2.0 <4.0.0' + sdk: ^3.4.0 flutter: '>=3.3.0' dependencies: diff --git a/packages/firebase_database/firebase_database_web/pubspec.yaml b/packages/firebase_database/firebase_database_web/pubspec.yaml index de8013a0ac88..e01dfde5d5a9 100644 --- a/packages/firebase_database/firebase_database_web/pubspec.yaml +++ b/packages/firebase_database/firebase_database_web/pubspec.yaml @@ -4,7 +4,7 @@ version: 0.2.5+7 homepage: https://github.com/firebase/flutterfire/tree/master/packages/firebase_database/firebase_database_web environment: - sdk: '>=3.2.0 <4.0.0' + sdk: ^3.4.0 flutter: '>=3.3.0' dependencies: diff --git a/packages/firebase_messaging/firebase_messaging_web/lib/firebase_messaging_web.dart b/packages/firebase_messaging/firebase_messaging_web/lib/firebase_messaging_web.dart index 8f9d2750cf6b..72ad7c258991 100644 --- a/packages/firebase_messaging/firebase_messaging_web/lib/firebase_messaging_web.dart +++ b/packages/firebase_messaging/firebase_messaging_web/lib/firebase_messaging_web.dart @@ -145,7 +145,7 @@ class FirebaseMessagingWeb extends FirebaseMessagingPlatform { }) { return convertWebExceptions(() async { String status = - (await web.Notification.requestPermission().toDart) as String; + (await web.Notification.requestPermission().toDart).toDart; return utils.getNotificationSettings(status); }); } diff --git a/packages/firebase_messaging/firebase_messaging_web/lib/src/interop/messaging.dart b/packages/firebase_messaging/firebase_messaging_web/lib/src/interop/messaging.dart index a9d199a5c589..5e8de3c68ad7 100644 --- a/packages/firebase_messaging/firebase_messaging_web/lib/src/interop/messaging.dart +++ b/packages/firebase_messaging/firebase_messaging_web/lib/src/interop/messaging.dart @@ -31,8 +31,10 @@ class Messaging extends JsObjectWrapper { return _expando[jsObject] ??= Messaging._fromJsObject(jsObject); } - static Future isSupported() => - messaging_interop.isSupported().toDart.then((value) => value! as bool); + static Future isSupported() => messaging_interop + .isSupported() + .toDart + .then((value) => (value! as JSBoolean).toDart); Messaging._fromJsObject(messaging_interop.MessagingJsImpl jsObject) : super.fromJsObject(jsObject); @@ -45,13 +47,15 @@ class Messaging extends JsObjectWrapper { /// that can be used to send push messages to this user. Future getToken({String? vapidKey}) async { try { - final token = (await messaging_interop - .getToken( - jsObject, - vapidKey == null - ? null - : messaging_interop.GetTokenOptions(vapidKey: vapidKey.toJS)) - .toDart)! as String; + final token = ((await messaging_interop + .getToken( + jsObject, + vapidKey == null + ? null + : messaging_interop.GetTokenOptions( + vapidKey: vapidKey.toJS)) + .toDart)! as JSString) + .toDart; return token; } catch (err) { // A race condition can happen in which the service worker get registered diff --git a/packages/firebase_messaging/firebase_messaging_web/pubspec.yaml b/packages/firebase_messaging/firebase_messaging_web/pubspec.yaml index e403129c4a27..9e64e92c423f 100644 --- a/packages/firebase_messaging/firebase_messaging_web/pubspec.yaml +++ b/packages/firebase_messaging/firebase_messaging_web/pubspec.yaml @@ -5,7 +5,7 @@ repository: https://github.com/firebase/flutterfire/tree/master/packages/firebas version: 3.8.7 environment: - sdk: '>=3.2.0 <4.0.0' + sdk: ^3.4.0 flutter: '>=3.3.0' dependencies: diff --git a/packages/firebase_remote_config/firebase_remote_config_web/lib/src/interop/firebase_remote_config.dart b/packages/firebase_remote_config/firebase_remote_config_web/lib/src/interop/firebase_remote_config.dart index 569be577a9be..156ef59dc6a3 100644 --- a/packages/firebase_remote_config/firebase_remote_config_web/lib/src/interop/firebase_remote_config.dart +++ b/packages/firebase_remote_config/firebase_remote_config_web/lib/src/interop/firebase_remote_config.dart @@ -86,7 +86,7 @@ class RemoteConfig Future activate() async => remote_config_interop .activate(jsObject) .toDart - .then((value) => value! as bool); + .then((value) => (value! as JSBoolean).toDart); /// Ensures the last activated config are available to the getters. Future ensureInitialized() async => @@ -101,7 +101,7 @@ class RemoteConfig /// If the fetched configs were already activated, the promise will resolve to false. Future fetchAndActivate() async => remote_config_interop.fetchAndActivate(jsObject).toDart.then( - (value) => value! as bool, + (value) => (value! as JSBoolean).toDart, ); /// Returns all config values. diff --git a/packages/firebase_remote_config/firebase_remote_config_web/pubspec.yaml b/packages/firebase_remote_config/firebase_remote_config_web/pubspec.yaml index c937048468a5..5e7ad81874fb 100644 --- a/packages/firebase_remote_config/firebase_remote_config_web/pubspec.yaml +++ b/packages/firebase_remote_config/firebase_remote_config_web/pubspec.yaml @@ -6,7 +6,7 @@ repository: https://github.com/firebase/flutterfire/tree/master/packages/firebas version: 1.6.7 environment: - sdk: '>=3.2.0 <4.0.0' + sdk: ^3.4.0 flutter: '>=3.3.0' dependencies: diff --git a/packages/firebase_storage/firebase_storage_web/pubspec.yaml b/packages/firebase_storage/firebase_storage_web/pubspec.yaml index 26ae24e21a41..6070aa0e330a 100644 --- a/packages/firebase_storage/firebase_storage_web/pubspec.yaml +++ b/packages/firebase_storage/firebase_storage_web/pubspec.yaml @@ -5,7 +5,7 @@ repository: https://github.com/firebase/flutterfire/tree/master/packages/firebas version: 3.9.7 environment: - sdk: '>=3.2.0 <4.0.0' + sdk: ^3.4.0 flutter: '>=3.3.0' dependencies: diff --git a/packages/firebase_vertexai/firebase_vertexai/example/pubspec.yaml b/packages/firebase_vertexai/firebase_vertexai/example/pubspec.yaml index e7fd589f84a6..14908bc330c2 100644 --- a/packages/firebase_vertexai/firebase_vertexai/example/pubspec.yaml +++ b/packages/firebase_vertexai/firebase_vertexai/example/pubspec.yaml @@ -7,7 +7,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: '>=3.2.0 <4.0.0' + sdk: ^3.4.0 # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions diff --git a/packages/firebase_vertexai/firebase_vertexai/pubspec.yaml b/packages/firebase_vertexai/firebase_vertexai/pubspec.yaml index 65b483e6dc3a..731f1e81d44a 100644 --- a/packages/firebase_vertexai/firebase_vertexai/pubspec.yaml +++ b/packages/firebase_vertexai/firebase_vertexai/pubspec.yaml @@ -4,7 +4,7 @@ version: 0.1.1 homepage: https://firebase.google.com/docs/vertex-ai/get-started?platform=flutter environment: - sdk: '>=3.2.0 <4.0.0' + sdk: ^3.4.0 flutter: ">=3.16.0" dependencies: