From 6952e99dade523b724a44954c40ec58671e7aae7 Mon Sep 17 00:00:00 2001 From: Remi Rousselet Date: Fri, 25 Feb 2022 13:02:26 +0100 Subject: [PATCH 1/3] fix: update all Dart SDK version constraints to Dart >= 2.16.0 --- .../cloud_firestore/example/pubspec.yaml | 2 +- .../lib/src/load_bundle_task.dart | 1 + .../cloud_firestore/pubspec.yaml | 2 +- .../pubspec.yaml | 2 +- .../test/set_options_test.dart | 2 +- .../cloud_firestore_web/pubspec.yaml | 2 +- .../cloud_firestore_odm/example/pubspec.yaml | 2 +- .../cloud_firestore_odm/pubspec.yaml | 2 +- .../cloud_firestore_odm/test/common.dart | 4 +- .../pubspec.yaml | 2 +- .../pubspec.yaml | 2 +- .../cloud_functions/example/pubspec.yaml | 2 +- .../cloud_functions/pubspec.yaml | 2 +- .../pubspec.yaml | 2 +- .../cloud_functions_web/pubspec.yaml | 2 +- .../firebase_analytics/example/pubspec.yaml | 2 +- .../firebase_analytics/pubspec.yaml | 2 +- .../pubspec.yaml | 2 +- .../firebase_analytics_web/pubspec.yaml | 2 +- .../firebase_app_check/example/pubspec.yaml | 2 +- .../firebase_app_check/pubspec.yaml | 2 +- .../pubspec.yaml | 2 +- .../firebase_app_check_web/pubspec.yaml | 2 +- .../example/pubspec.yaml | 2 +- .../firebase_app_installations/pubspec.yaml | 2 +- .../pubspec.yaml | 2 +- .../pubspec.yaml | 2 +- .../firebase_auth/example/pubspec.yaml | 2 +- .../firebase_auth/firebase_auth/pubspec.yaml | 2 +- .../pubspec.yaml | 2 +- .../lib/src/interop/auth.dart | 38 +++++++++---------- .../firebase_auth_web/pubspec.yaml | 2 +- .../firebase_core/example/pubspec.yaml | 2 +- .../pubspec.yaml | 2 +- .../firebase_core_web/pubspec.yaml | 2 +- .../firebase_crashlytics/example/pubspec.yaml | 2 +- .../firebase_crashlytics/pubspec.yaml | 2 +- .../pubspec.yaml | 2 +- .../firebase_database/example/pubspec.yaml | 2 +- .../lib/src/data_snapshot.dart | 3 +- .../firebase_database/lib/src/query.dart | 22 +++++------ .../firebase_database/pubspec.yaml | 2 +- .../pubspec.yaml | 2 +- .../firebase_database_web/pubspec.yaml | 2 +- .../example/pubspec.yaml | 2 +- .../firebase_dynamic_links/pubspec.yaml | 2 +- .../pubspec.yaml | 2 +- .../example/pubspec.yaml | 2 +- .../firebase_in_app_messaging/pubspec.yaml | 2 +- .../pubspec.yaml | 2 +- .../firebase_messaging/example/pubspec.yaml | 2 +- .../firebase_messaging/pubspec.yaml | 2 +- .../pubspec.yaml | 2 +- .../firebase_messaging_web/pubspec.yaml | 2 +- .../example/pubspec.yaml | 2 +- .../firebase_ml_model_downloader/pubspec.yaml | 2 +- .../pubspec.yaml | 2 +- .../firebase_performance/example/pubspec.yaml | 2 +- .../firebase_performance/pubspec.yaml | 2 +- .../pubspec.yaml | 2 +- .../firebase_performance_web/pubspec.yaml | 2 +- .../example/pubspec.yaml | 2 +- .../firebase_remote_config/pubspec.yaml | 2 +- .../pubspec.yaml | 2 +- .../firebase_remote_config_web/pubspec.yaml | 2 +- .../firebase_storage/example/pubspec.yaml | 2 +- .../firebase_storage/pubspec.yaml | 2 +- .../pubspec.yaml | 2 +- .../lib/src/interop/storage.dart | 2 + .../firebase_storage_web/pubspec.yaml | 2 +- packages/flutterfire_ui/example/pubspec.yaml | 2 +- packages/flutterfire_ui/pubspec.yaml | 2 +- tests/pubspec.yaml | 2 +- 73 files changed, 101 insertions(+), 103 deletions(-) diff --git a/packages/cloud_firestore/cloud_firestore/example/pubspec.yaml b/packages/cloud_firestore/cloud_firestore/example/pubspec.yaml index 4d4c8072f202..f27a61bb7f69 100755 --- a/packages/cloud_firestore/cloud_firestore/example/pubspec.yaml +++ b/packages/cloud_firestore/cloud_firestore/example/pubspec.yaml @@ -2,7 +2,7 @@ name: cloud_firestore_example description: Demonstrates how to use the firestore plugin. environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.16.0 <3.0.0' flutter: '>=1.12.13+hotfix.4' dependencies: diff --git a/packages/cloud_firestore/cloud_firestore/lib/src/load_bundle_task.dart b/packages/cloud_firestore/cloud_firestore/lib/src/load_bundle_task.dart index 8ae5242b321c..6ef78d57c9aa 100644 --- a/packages/cloud_firestore/cloud_firestore/lib/src/load_bundle_task.dart +++ b/packages/cloud_firestore/cloud_firestore/lib/src/load_bundle_task.dart @@ -8,5 +8,6 @@ class LoadBundleTask { final LoadBundleTaskPlatform _delegate; late final Stream stream = + // ignore: unnecessary_lambdas, false positive, event is dynamic _delegate.stream.map((event) => LoadBundleTaskSnapshot._(event)); } diff --git a/packages/cloud_firestore/cloud_firestore/pubspec.yaml b/packages/cloud_firestore/cloud_firestore/pubspec.yaml index 8b9bbd92b7ab..77b3a9775a96 100755 --- a/packages/cloud_firestore/cloud_firestore/pubspec.yaml +++ b/packages/cloud_firestore/cloud_firestore/pubspec.yaml @@ -11,7 +11,7 @@ false_secrets: - dartpad/** environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" flutter: ">=1.12.13+hotfix.5" dependencies: diff --git a/packages/cloud_firestore/cloud_firestore_platform_interface/pubspec.yaml b/packages/cloud_firestore/cloud_firestore_platform_interface/pubspec.yaml index 29aacb344d7d..2f5eea072faf 100644 --- a/packages/cloud_firestore/cloud_firestore_platform_interface/pubspec.yaml +++ b/packages/cloud_firestore/cloud_firestore_platform_interface/pubspec.yaml @@ -5,7 +5,7 @@ homepage: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/c repository: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/cloud_firestore/cloud_firestore_platform_interface environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" flutter: ">=1.9.1+hotfix.5" dependencies: diff --git a/packages/cloud_firestore/cloud_firestore_platform_interface/test/set_options_test.dart b/packages/cloud_firestore/cloud_firestore_platform_interface/test/set_options_test.dart index aea54b397ae6..65e924e10856 100644 --- a/packages/cloud_firestore/cloud_firestore_platform_interface/test/set_options_test.dart +++ b/packages/cloud_firestore/cloud_firestore_platform_interface/test/set_options_test.dart @@ -9,7 +9,7 @@ import 'package:flutter_test/flutter_test.dart'; void main() { group('$SetOptions', () { test('throws if no options are provided', () { - expect(() => SetOptions(), throwsAssertionError); + expect(SetOptions.new, throwsAssertionError); }); test('throws if mergeFields contains invalid values', () { diff --git a/packages/cloud_firestore/cloud_firestore_web/pubspec.yaml b/packages/cloud_firestore/cloud_firestore_web/pubspec.yaml index f277510cc978..57b193b88bd1 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/FirebaseExtended/flutterfire/tree/master/packages version: 2.6.9 environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" flutter: ">=1.12.13+hotfix.4" dependencies: diff --git a/packages/cloud_firestore_odm/cloud_firestore_odm/example/pubspec.yaml b/packages/cloud_firestore_odm/cloud_firestore_odm/example/pubspec.yaml index 6e23ae594461..636b2ff17b16 100644 --- a/packages/cloud_firestore_odm/cloud_firestore_odm/example/pubspec.yaml +++ b/packages/cloud_firestore_odm/cloud_firestore_odm/example/pubspec.yaml @@ -3,7 +3,7 @@ version: 1.0.0-dev.1 publish_to: none environment: - sdk: ">=2.14.0-0.0.dev <3.0.0" + sdk: ">=2.16.0 <3.0.0" dependencies: cloud_firestore: diff --git a/packages/cloud_firestore_odm/cloud_firestore_odm/pubspec.yaml b/packages/cloud_firestore_odm/cloud_firestore_odm/pubspec.yaml index 0938d6954fb0..6c70447517c5 100644 --- a/packages/cloud_firestore_odm/cloud_firestore_odm/pubspec.yaml +++ b/packages/cloud_firestore_odm/cloud_firestore_odm/pubspec.yaml @@ -8,7 +8,7 @@ false_secrets: - example/** environment: - sdk: ">=2.14.0-0.0.dev <3.0.0" + sdk: ">=2.16.0 <3.0.0" dependencies: cloud_firestore: ^3.1.9 diff --git a/packages/cloud_firestore_odm/cloud_firestore_odm/test/common.dart b/packages/cloud_firestore_odm/cloud_firestore_odm/test/common.dart index 0bf47933d659..bfccd3632e1e 100644 --- a/packages/cloud_firestore_odm/cloud_firestore_odm/test/common.dart +++ b/packages/cloud_firestore_odm/cloud_firestore_odm/test/common.dart @@ -14,7 +14,7 @@ class FakeCollectionReference Future> get([GetOptions? options]) async { return FakeQuerySnapshot( valueListenable.value - .map((e) => FakeFirestoreQueryDocumentSnapshot(e)) + .map(FakeFirestoreQueryDocumentSnapshot.new) .toList(), ); } @@ -30,7 +30,7 @@ class FakeCollectionReference controller.add( FakeQuerySnapshot( valueListenable.value - .map((e) => FakeFirestoreQueryDocumentSnapshot(e)) + .map(FakeFirestoreQueryDocumentSnapshot.new) .toList(), ), ); diff --git a/packages/cloud_firestore_odm/cloud_firestore_odm_generator/cloud_firestore_odm_generator_integration_test/pubspec.yaml b/packages/cloud_firestore_odm/cloud_firestore_odm_generator/cloud_firestore_odm_generator_integration_test/pubspec.yaml index b4c47f2282bd..38ee2e518f3f 100644 --- a/packages/cloud_firestore_odm/cloud_firestore_odm_generator/cloud_firestore_odm_generator_integration_test/pubspec.yaml +++ b/packages/cloud_firestore_odm/cloud_firestore_odm_generator/cloud_firestore_odm_generator_integration_test/pubspec.yaml @@ -3,7 +3,7 @@ version: 1.0.0-dev.1 publish_to: none environment: - sdk: ">=2.14.0-0.0.dev <3.0.0" + sdk: ">=2.16.0 <3.0.0" dependencies: cloud_firestore: ^3.1.9 diff --git a/packages/cloud_firestore_odm/cloud_firestore_odm_generator/pubspec.yaml b/packages/cloud_firestore_odm/cloud_firestore_odm_generator/pubspec.yaml index 2a1beae743c4..58ce1dca3186 100644 --- a/packages/cloud_firestore_odm/cloud_firestore_odm_generator/pubspec.yaml +++ b/packages/cloud_firestore_odm/cloud_firestore_odm_generator/pubspec.yaml @@ -5,7 +5,7 @@ repository: https://github.com/FirebaseExtended/flutterfire/tree/master/packages version: 1.0.0-dev.9 environment: - sdk: ">=2.14.0-0.0.dev <3.0.0" + sdk: ">=2.16.0 <3.0.0" dependencies: analyzer: ^2.0.0 diff --git a/packages/cloud_functions/cloud_functions/example/pubspec.yaml b/packages/cloud_functions/cloud_functions/example/pubspec.yaml index 22a1ea7dd717..cb7a3e0ca55b 100644 --- a/packages/cloud_functions/cloud_functions/example/pubspec.yaml +++ b/packages/cloud_functions/cloud_functions/example/pubspec.yaml @@ -2,7 +2,7 @@ name: cloud_functions_example description: Demonstrates how to use the cloud_functions plugin. environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.16.0 <3.0.0' flutter: '>=1.12.13+hotfix.4' dependencies: diff --git a/packages/cloud_functions/cloud_functions/pubspec.yaml b/packages/cloud_functions/cloud_functions/pubspec.yaml index d16a7dc2a37c..88eabc5d5668 100644 --- a/packages/cloud_functions/cloud_functions/pubspec.yaml +++ b/packages/cloud_functions/cloud_functions/pubspec.yaml @@ -8,7 +8,7 @@ false_secrets: - example/** environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" flutter: ">=1.12.13+hotfix.5" dependencies: diff --git a/packages/cloud_functions/cloud_functions_platform_interface/pubspec.yaml b/packages/cloud_functions/cloud_functions_platform_interface/pubspec.yaml index 5091c6206929..725855ec26de 100644 --- a/packages/cloud_functions/cloud_functions_platform_interface/pubspec.yaml +++ b/packages/cloud_functions/cloud_functions_platform_interface/pubspec.yaml @@ -8,7 +8,7 @@ repository: https://github.com/FirebaseExtended/flutterfire/tree/master/packages version: 5.1.0 environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" flutter: ">=1.9.1+hotfix.5" dependencies: diff --git a/packages/cloud_functions/cloud_functions_web/pubspec.yaml b/packages/cloud_functions/cloud_functions_web/pubspec.yaml index 249c4ff2bdb2..092bce5b6aae 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/FirebaseExtended/flutterfire/tree/master/packages version: 4.2.8 environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" flutter: ">=1.12.13+hotfix.4" dependencies: diff --git a/packages/firebase_analytics/firebase_analytics/example/pubspec.yaml b/packages/firebase_analytics/firebase_analytics/example/pubspec.yaml index f150c8ce6640..dfaa3ab23cd1 100755 --- a/packages/firebase_analytics/firebase_analytics/example/pubspec.yaml +++ b/packages/firebase_analytics/firebase_analytics/example/pubspec.yaml @@ -2,7 +2,7 @@ name: firebase_analytics_example description: Demonstrates how to use the firebase_analytics plugin. environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" flutter: ">=1.12.13+hotfix.5" dependencies: diff --git a/packages/firebase_analytics/firebase_analytics/pubspec.yaml b/packages/firebase_analytics/firebase_analytics/pubspec.yaml index 88f0f44c2a41..cead871a8885 100755 --- a/packages/firebase_analytics/firebase_analytics/pubspec.yaml +++ b/packages/firebase_analytics/firebase_analytics/pubspec.yaml @@ -10,7 +10,7 @@ false_secrets: - example/** environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.16.0 <3.0.0' flutter: '>=1.12.13+hotfix.5' dependencies: diff --git a/packages/firebase_analytics/firebase_analytics_platform_interface/pubspec.yaml b/packages/firebase_analytics/firebase_analytics_platform_interface/pubspec.yaml index f030701f10c4..8b5457fea1b6 100644 --- a/packages/firebase_analytics/firebase_analytics_platform_interface/pubspec.yaml +++ b/packages/firebase_analytics/firebase_analytics_platform_interface/pubspec.yaml @@ -5,7 +5,7 @@ repository: https://github.com/FirebaseExtended/flutterfire/tree/master/packages version: 3.1.0 environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.16.0 <3.0.0' flutter: '>=1.9.1+hotfix.5' dependencies: diff --git a/packages/firebase_analytics/firebase_analytics_web/pubspec.yaml b/packages/firebase_analytics/firebase_analytics_web/pubspec.yaml index 1895503b5d91..98ba16cb63f1 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/FirebaseExtended/flutterfire/tree/master/packages version: 0.4.0+7 environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.16.0 <3.0.0' flutter: '>=1.12.13+hotfix.4' dependencies: diff --git a/packages/firebase_app_check/firebase_app_check/example/pubspec.yaml b/packages/firebase_app_check/firebase_app_check/example/pubspec.yaml index 2cba011e4de6..053646a5b585 100644 --- a/packages/firebase_app_check/firebase_app_check/example/pubspec.yaml +++ b/packages/firebase_app_check/firebase_app_check/example/pubspec.yaml @@ -6,7 +6,7 @@ publish_to: "none" version: 1.0.0+1 environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" dependencies: cupertino_icons: ^0.1.2 diff --git a/packages/firebase_app_check/firebase_app_check/pubspec.yaml b/packages/firebase_app_check/firebase_app_check/pubspec.yaml index f838557b5234..eeac9bd5f181 100644 --- a/packages/firebase_app_check/firebase_app_check/pubspec.yaml +++ b/packages/firebase_app_check/firebase_app_check/pubspec.yaml @@ -8,7 +8,7 @@ false_secrets: - example/** environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" flutter: ">=1.20.0" dependencies: diff --git a/packages/firebase_app_check/firebase_app_check_platform_interface/pubspec.yaml b/packages/firebase_app_check/firebase_app_check_platform_interface/pubspec.yaml index d3b905621922..d79bb884c14d 100644 --- a/packages/firebase_app_check/firebase_app_check_platform_interface/pubspec.yaml +++ b/packages/firebase_app_check/firebase_app_check_platform_interface/pubspec.yaml @@ -4,7 +4,7 @@ homepage: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/f version: 0.0.4 environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" flutter: ">=1.20.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 b67187bf2bbd..19a467861338 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/FirebaseExtended/flutterfire/tree/master/packages/f version: 0.0.5+6 environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" flutter: ">=1.20.0" dependencies: diff --git a/packages/firebase_app_installations/firebase_app_installations/example/pubspec.yaml b/packages/firebase_app_installations/firebase_app_installations/example/pubspec.yaml index f6598f609334..a58df8802057 100644 --- a/packages/firebase_app_installations/firebase_app_installations/example/pubspec.yaml +++ b/packages/firebase_app_installations/firebase_app_installations/example/pubspec.yaml @@ -18,7 +18,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.16.0 <3.0.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_app_installations/firebase_app_installations/pubspec.yaml b/packages/firebase_app_installations/firebase_app_installations/pubspec.yaml index 7739f7fc4142..d7e978bde101 100644 --- a/packages/firebase_app_installations/firebase_app_installations/pubspec.yaml +++ b/packages/firebase_app_installations/firebase_app_installations/pubspec.yaml @@ -9,7 +9,7 @@ false_secrets: - example/** environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" flutter: ">=1.20.0" dependencies: diff --git a/packages/firebase_app_installations/firebase_app_installations_platform_interface/pubspec.yaml b/packages/firebase_app_installations/firebase_app_installations_platform_interface/pubspec.yaml index a422c7b8db11..c26570e0ece4 100644 --- a/packages/firebase_app_installations/firebase_app_installations_platform_interface/pubspec.yaml +++ b/packages/firebase_app_installations/firebase_app_installations_platform_interface/pubspec.yaml @@ -5,7 +5,7 @@ homepage: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/f repository: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_app_installations/firebase_app_installations_platform_interface environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" flutter: ">=1.17.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 66520b104b68..f5403a6b3266 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/FirebaseExtended/flutterfire/tree/master/packages/f repository: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_app_installations/firebase_app_installations_web environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.16.0 <3.0.0' flutter: '>=1.20.0' dependencies: diff --git a/packages/firebase_auth/firebase_auth/example/pubspec.yaml b/packages/firebase_auth/firebase_auth/example/pubspec.yaml index 1dd870ccf49f..dff51bbb93de 100644 --- a/packages/firebase_auth/firebase_auth/example/pubspec.yaml +++ b/packages/firebase_auth/firebase_auth/example/pubspec.yaml @@ -2,7 +2,7 @@ name: firebase_auth_example description: Demonstrates how to use the firebase_auth plugin. environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" dependencies: firebase_auth: diff --git a/packages/firebase_auth/firebase_auth/pubspec.yaml b/packages/firebase_auth/firebase_auth/pubspec.yaml index 9d5cf459c333..67aefe674781 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: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" flutter: ">=1.12.13+hotfix.5" dependencies: diff --git a/packages/firebase_auth/firebase_auth_platform_interface/pubspec.yaml b/packages/firebase_auth/firebase_auth_platform_interface/pubspec.yaml index 4dcf1f91607b..491d854d6889 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/FirebaseExtended/flutterfire/tree/master/packages version: 6.2.0 environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" flutter: ">=1.9.1+hotfix.5" dependencies: 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 8888ad62c1a1..7fb0618e4927 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 @@ -77,6 +77,7 @@ class User extends UserInfo { List get providerData => jsObject.providerData // explicitly typing the param as dynamic to work-around // https://github.com/dart-lang/sdk/issues/33537 + // ignore: unnecessary_lambdas, false positive, data is dynamic .map((dynamic data) => UserInfo._fromJsObject(data)) .toList(); @@ -118,7 +119,7 @@ class User extends UserInfo { Future linkWithCredential( auth_interop.OAuthCredential? credential) => handleThenable(jsObject.linkWithCredential(credential)) - .then((u) => UserCredential.fromJsObject(u)); + .then(UserCredential.fromJsObject); /// Links the user account with the given [phoneNumber] in E.164 format /// (e.g. +16505550101) and [applicationVerifier]. @@ -126,14 +127,14 @@ class User extends UserInfo { String phoneNumber, ApplicationVerifier applicationVerifier) => handleThenable(jsObject.linkWithPhoneNumber( phoneNumber, applicationVerifier.jsObject)) - .then((c) => ConfirmationResult.fromJsObject(c)); + .then(ConfirmationResult.fromJsObject); /// Links the authenticated [provider] to the user account using /// a pop-up based OAuth flow. /// It returns the [UserCredential] information if linking is successful. Future linkWithPopup(AuthProvider provider) => handleThenable(jsObject.linkWithPopup(provider.jsObject)) - .then((u) => UserCredential.fromJsObject(u)); + .then(UserCredential.fromJsObject); /// Links the authenticated [provider] to the user account using /// a full-page redirect flow. @@ -147,7 +148,7 @@ class User extends UserInfo { Future reauthenticateWithCredential( auth_interop.OAuthCredential credential) => handleThenable(jsObject.reauthenticateWithCredential(credential)) - .then((o) => UserCredential.fromJsObject(o)); + .then(UserCredential.fromJsObject); /// Re-authenticates a user using a fresh credential. /// Use before operations such as [updatePassword] that require tokens @@ -158,14 +159,14 @@ class User extends UserInfo { String phoneNumber, ApplicationVerifier applicationVerifier) => handleThenable(jsObject.reauthenticateWithPhoneNumber( phoneNumber, applicationVerifier.jsObject)) - .then((c) => ConfirmationResult.fromJsObject(c)); + .then(ConfirmationResult.fromJsObject); /// Reauthenticates a user with the specified provider using /// a pop-up based OAuth flow. /// It returns the [UserCredential] information if reauthentication is successful. Future reauthenticateWithPopup(AuthProvider provider) => handleThenable(jsObject.reauthenticateWithPopup(provider.jsObject)) - .then((u) => UserCredential.fromJsObject(u)); + .then(UserCredential.fromJsObject); /// Reauthenticates a user with the specified OAuth [provider] using /// a full-page redirect flow. @@ -233,8 +234,7 @@ class User extends UserInfo { ? jsObject.getIdTokenResult() : jsObject.getIdTokenResult(forceRefresh); - return handleThenable(promise) - .then((object) => IdTokenResult._fromJsObject(object)); + return handleThenable(promise).then(IdTokenResult._fromJsObject); } /// Returns a JSON-serializable representation of this object. @@ -456,7 +456,7 @@ class Auth extends JsObjectWrapper { /// email/link. Future> fetchSignInMethodsForEmail(String email) => handleThenable(jsObject.fetchSignInMethodsForEmail(email)) - .then((list) => List.from(list)); + .then(List.from); /// Checks if an incoming link is a sign-in with email link. bool isSignInWithEmailLink(String emailLink) => @@ -469,7 +469,7 @@ class Auth extends JsObjectWrapper { /// operation was called. Future getRedirectResult() => handleThenable(jsObject.getRedirectResult()) - .then((u) => UserCredential.fromJsObject(u)); + .then(UserCredential.fromJsObject); /// Sends a sign-in email link to the user with the specified email. /// @@ -534,7 +534,7 @@ class Auth extends JsObjectWrapper { Future signInWithCredential( auth_interop.OAuthCredential credential) => handleThenable(jsObject.signInWithCredential(credential)) - .then((u) => UserCredential.fromJsObject(u)); + .then(UserCredential.fromJsObject); /// Asynchronously signs in as an anonymous user. // @@ -543,7 +543,7 @@ class Auth extends JsObjectWrapper { // returned. Future signInAnonymously() => handleThenable(jsObject.signInAnonymously()) - .then((u) => UserCredential.fromJsObject(u)); + .then(UserCredential.fromJsObject); /// Asynchronously signs in using a custom token. /// @@ -554,7 +554,7 @@ class Auth extends JsObjectWrapper { /// the Firebase Auth service. Future signInWithCustomToken(String token) => handleThenable(jsObject.signInWithCustomToken(token)) - .then((u) => UserCredential.fromJsObject(u)); + .then(UserCredential.fromJsObject); /// Signs in a user asynchronously using a custom [token] and returns any /// additional user info data or credentials. @@ -569,7 +569,7 @@ class Auth extends JsObjectWrapper { /// the Firebase Auth service. Future signInAndRetrieveDataWithCustomToken(String token) => handleThenable(jsObject.signInAndRetrieveDataWithCustomToken(token)) - .then((u) => UserCredential.fromJsObject(u)); + .then(UserCredential.fromJsObject); /// Asynchronously signs in using an email and password. /// @@ -582,12 +582,12 @@ class Auth extends JsObjectWrapper { Future signInWithEmailAndPassword( String email, String password) => handleThenable(jsObject.signInWithEmailAndPassword(email, password)) - .then((u) => UserCredential.fromJsObject(u)); + .then(UserCredential.fromJsObject); /// Signs in using [email] and [emailLink] link. Future signInWithEmailLink(String email, String emailLink) => handleThenable(jsObject.signInWithEmailLink(email, emailLink)) - .then((u) => UserCredential.fromJsObject(u)); + .then(UserCredential.fromJsObject); /// Asynchronously signs in using a phone number in E.164 format /// (e.g. +16505550101). @@ -603,14 +603,14 @@ class Auth extends JsObjectWrapper { String phoneNumber, ApplicationVerifier applicationVerifier) => handleThenable(jsObject.signInWithPhoneNumber( phoneNumber, applicationVerifier.jsObject)) - .then((c) => ConfirmationResult.fromJsObject(c)); + .then(ConfirmationResult.fromJsObject); /// Signs in using a popup-based OAuth authentication flow with the /// given [provider]. /// Returns [UserCredential] if successful, or an error object if unsuccessful. Future signInWithPopup(AuthProvider provider) => handleThenable(jsObject.signInWithPopup(provider.jsObject)) - .then((u) => UserCredential.fromJsObject(u)); + .then(UserCredential.fromJsObject); /// Signs in using a full-page redirect flow with the given [provider]. Future signInWithRedirect(AuthProvider provider) => @@ -1009,7 +1009,7 @@ class ConfirmationResult /// the code that was sent to the user's mobile device. Future confirm(String verificationCode) => handleThenable(jsObject.confirm(verificationCode)) - .then((u) => UserCredential.fromJsObject(u)); + .then(UserCredential.fromJsObject); } /// A structure containing a [User], an [OAuthCredential] and [operationType]. diff --git a/packages/firebase_auth/firebase_auth_web/pubspec.yaml b/packages/firebase_auth/firebase_auth_web/pubspec.yaml index 9091c0396719..48e8454b6962 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/FirebaseExtended/flutterfire/tree/master/packages version: 3.3.8 environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" flutter: ">=1.12.13+hotfix.4" dependencies: diff --git a/packages/firebase_core/firebase_core/example/pubspec.yaml b/packages/firebase_core/firebase_core/example/pubspec.yaml index 2f9ad9ba2905..3fe4286e83a9 100644 --- a/packages/firebase_core/firebase_core/example/pubspec.yaml +++ b/packages/firebase_core/firebase_core/example/pubspec.yaml @@ -2,7 +2,7 @@ name: firebase_core_example description: Demonstrates how to use the firebase_core plugin. environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.16.0 <3.0.0' dependencies: firebase_core: diff --git a/packages/firebase_core/firebase_core_platform_interface/pubspec.yaml b/packages/firebase_core/firebase_core_platform_interface/pubspec.yaml index 60b0642cbbac..d0148e8bcc1d 100644 --- a/packages/firebase_core/firebase_core_platform_interface/pubspec.yaml +++ b/packages/firebase_core/firebase_core_platform_interface/pubspec.yaml @@ -7,7 +7,7 @@ repository: https://github.com/FirebaseExtended/flutterfire/tree/master/packages version: 4.2.4 environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.16.0 <3.0.0' flutter: ">=1.12.13+hotfix.5" dependencies: diff --git a/packages/firebase_core/firebase_core_web/pubspec.yaml b/packages/firebase_core/firebase_core_web/pubspec.yaml index e70acc3e0d70..f61daa17c0b1 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/FirebaseExtended/flutterfire/tree/master/packages version: 1.6.0 environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" flutter: ">=1.12.13+hotfix.5" dependencies: diff --git a/packages/firebase_crashlytics/firebase_crashlytics/example/pubspec.yaml b/packages/firebase_crashlytics/firebase_crashlytics/example/pubspec.yaml index ce8c6f2980b1..17cfeeedf69c 100644 --- a/packages/firebase_crashlytics/firebase_crashlytics/example/pubspec.yaml +++ b/packages/firebase_crashlytics/firebase_crashlytics/example/pubspec.yaml @@ -2,7 +2,7 @@ name: firebase_crashlytics_example description: Demonstrates how to use the firebase_crashlytics plugin. environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.16.0 <3.0.0' flutter: '>=1.12.13+hotfix.5' dependencies: diff --git a/packages/firebase_crashlytics/firebase_crashlytics/pubspec.yaml b/packages/firebase_crashlytics/firebase_crashlytics/pubspec.yaml index 979e2b58461e..2803a2bbd06d 100644 --- a/packages/firebase_crashlytics/firebase_crashlytics/pubspec.yaml +++ b/packages/firebase_crashlytics/firebase_crashlytics/pubspec.yaml @@ -10,7 +10,7 @@ false_secrets: - example/** environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" flutter: ">=1.12.13+hotfix.5" dependencies: diff --git a/packages/firebase_crashlytics/firebase_crashlytics_platform_interface/pubspec.yaml b/packages/firebase_crashlytics/firebase_crashlytics_platform_interface/pubspec.yaml index b48e38c5a62f..2775fb13f2a5 100644 --- a/packages/firebase_crashlytics/firebase_crashlytics_platform_interface/pubspec.yaml +++ b/packages/firebase_crashlytics/firebase_crashlytics_platform_interface/pubspec.yaml @@ -5,7 +5,7 @@ homepage: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/f repository: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_crashlytics/firebase_crashlytics_platform_interface environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" flutter: ">=1.12.13+hotfix.5" dependencies: diff --git a/packages/firebase_database/firebase_database/example/pubspec.yaml b/packages/firebase_database/firebase_database/example/pubspec.yaml index ee84a5f130b0..a3c9b74e78a1 100755 --- a/packages/firebase_database/firebase_database/example/pubspec.yaml +++ b/packages/firebase_database/firebase_database/example/pubspec.yaml @@ -2,7 +2,7 @@ name: firebase_database_example description: Demonstrates how to use the firebase_database plugin. environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" flutter: ">=1.9.1+hotfix.2" dependencies: diff --git a/packages/firebase_database/firebase_database/lib/src/data_snapshot.dart b/packages/firebase_database/firebase_database/lib/src/data_snapshot.dart index e9b7ecf2f5db..04e92141a021 100644 --- a/packages/firebase_database/firebase_database/lib/src/data_snapshot.dart +++ b/packages/firebase_database/firebase_database/lib/src/data_snapshot.dart @@ -37,6 +37,5 @@ class DataSnapshot { DataSnapshot child(String path) => DataSnapshot._(_delegate.child(path)); /// An iterator for snapshots of the child nodes in this snapshot. - Iterable get children => - _delegate.children.map((e) => DataSnapshot._(e)); + Iterable get children => _delegate.children.map(DataSnapshot._); } diff --git a/packages/firebase_database/firebase_database/lib/src/query.dart b/packages/firebase_database/firebase_database/lib/src/query.dart index 562eae73e323..c2ff66058179 100644 --- a/packages/firebase_database/firebase_database/lib/src/query.dart +++ b/packages/firebase_database/firebase_database/lib/src/query.dart @@ -52,28 +52,24 @@ class Query { } /// Fires when children are added. - Stream get onChildAdded => _queryDelegate - .onChildAdded(_modifiers) - .map((item) => DatabaseEvent._(item)); + Stream get onChildAdded => + _queryDelegate.onChildAdded(_modifiers).map(DatabaseEvent._); /// Fires when children are removed. `previousChildKey` is null. - Stream get onChildRemoved => _queryDelegate - .onChildRemoved(_modifiers) - .map((item) => DatabaseEvent._(item)); + Stream get onChildRemoved => + _queryDelegate.onChildRemoved(_modifiers).map(DatabaseEvent._); /// Fires when children are changed. - Stream get onChildChanged => _queryDelegate - .onChildChanged(_modifiers) - .map((item) => DatabaseEvent._(item)); + Stream get onChildChanged => + _queryDelegate.onChildChanged(_modifiers).map(DatabaseEvent._); /// Fires when children are moved. - Stream get onChildMoved => _queryDelegate - .onChildMoved(_modifiers) - .map((item) => DatabaseEvent._(item)); + Stream get onChildMoved => + _queryDelegate.onChildMoved(_modifiers).map(DatabaseEvent._); /// Fires when the data at this location is updated. `previousChildKey` is null. Stream get onValue => - _queryDelegate.onValue(_modifiers).map((item) => DatabaseEvent._(item)); + _queryDelegate.onValue(_modifiers).map(DatabaseEvent._); /// Create a query constrained to only return child nodes with a value greater /// than or equal to the given value, using the given orderBy directive or diff --git a/packages/firebase_database/firebase_database/pubspec.yaml b/packages/firebase_database/firebase_database/pubspec.yaml index 0cf0bc1c10c9..00efd4aa666b 100755 --- a/packages/firebase_database/firebase_database/pubspec.yaml +++ b/packages/firebase_database/firebase_database/pubspec.yaml @@ -9,7 +9,7 @@ false_secrets: - example/** environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" flutter: ">=1.12.13+hotfix.5" dependencies: diff --git a/packages/firebase_database/firebase_database_platform_interface/pubspec.yaml b/packages/firebase_database/firebase_database_platform_interface/pubspec.yaml index 33256e157d34..727fd713b394 100755 --- a/packages/firebase_database/firebase_database_platform_interface/pubspec.yaml +++ b/packages/firebase_database/firebase_database_platform_interface/pubspec.yaml @@ -18,5 +18,5 @@ dev_dependencies: mockito: ^5.0.2 environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" flutter: ">=1.12.13+hotfix.5" diff --git a/packages/firebase_database/firebase_database_web/pubspec.yaml b/packages/firebase_database/firebase_database_web/pubspec.yaml index 667c2fc60b37..3254887aca10 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.0+6 homepage: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_database/firebase_database_web environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" flutter: ">=1.20.0" dependencies: diff --git a/packages/firebase_dynamic_links/firebase_dynamic_links/example/pubspec.yaml b/packages/firebase_dynamic_links/firebase_dynamic_links/example/pubspec.yaml index 5f6cd092376e..dd3847bc53dc 100644 --- a/packages/firebase_dynamic_links/firebase_dynamic_links/example/pubspec.yaml +++ b/packages/firebase_dynamic_links/firebase_dynamic_links/example/pubspec.yaml @@ -2,7 +2,7 @@ name: firebase_dynamic_links_example description: Demonstrates how to use the firebase_dynamic_links plugin. environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" flutter: ">=1.12.0" dependencies: diff --git a/packages/firebase_dynamic_links/firebase_dynamic_links/pubspec.yaml b/packages/firebase_dynamic_links/firebase_dynamic_links/pubspec.yaml index 36e6f3244352..ed5132e4bcac 100644 --- a/packages/firebase_dynamic_links/firebase_dynamic_links/pubspec.yaml +++ b/packages/firebase_dynamic_links/firebase_dynamic_links/pubspec.yaml @@ -10,7 +10,7 @@ false_secrets: - example/** environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.16.0 <3.0.0' flutter: ">=1.12.13+hotfix.5" dependencies: diff --git a/packages/firebase_dynamic_links/firebase_dynamic_links_platform_interface/pubspec.yaml b/packages/firebase_dynamic_links/firebase_dynamic_links_platform_interface/pubspec.yaml index 9e1533cfeb16..46b8e4c6746b 100644 --- a/packages/firebase_dynamic_links/firebase_dynamic_links_platform_interface/pubspec.yaml +++ b/packages/firebase_dynamic_links/firebase_dynamic_links_platform_interface/pubspec.yaml @@ -5,7 +5,7 @@ homepage: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/f repository: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_dynamic_links/firebase_dynamic_links_platform_interface environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" flutter: ">=1.9.1+hotfix.5" dependencies: diff --git a/packages/firebase_in_app_messaging/firebase_in_app_messaging/example/pubspec.yaml b/packages/firebase_in_app_messaging/firebase_in_app_messaging/example/pubspec.yaml index 03f97566f281..87e6798a953b 100644 --- a/packages/firebase_in_app_messaging/firebase_in_app_messaging/example/pubspec.yaml +++ b/packages/firebase_in_app_messaging/firebase_in_app_messaging/example/pubspec.yaml @@ -3,7 +3,7 @@ description: Demonstrates how to use the firebase_in_app_messaging plugin. publish_to: "none" environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" dependencies: cupertino_icons: ^1.0.2 diff --git a/packages/firebase_in_app_messaging/firebase_in_app_messaging/pubspec.yaml b/packages/firebase_in_app_messaging/firebase_in_app_messaging/pubspec.yaml index f02da9a05433..80759f2d1e8d 100644 --- a/packages/firebase_in_app_messaging/firebase_in_app_messaging/pubspec.yaml +++ b/packages/firebase_in_app_messaging/firebase_in_app_messaging/pubspec.yaml @@ -8,7 +8,7 @@ false_secrets: - example/** environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" flutter: ">=1.12.13+hotfix.5" dependencies: diff --git a/packages/firebase_in_app_messaging/firebase_in_app_messaging_platform_interface/pubspec.yaml b/packages/firebase_in_app_messaging/firebase_in_app_messaging_platform_interface/pubspec.yaml index f5d30cb5e54c..843792264682 100644 --- a/packages/firebase_in_app_messaging/firebase_in_app_messaging_platform_interface/pubspec.yaml +++ b/packages/firebase_in_app_messaging/firebase_in_app_messaging_platform_interface/pubspec.yaml @@ -6,7 +6,7 @@ repository: https://github.com/FirebaseExtended/flutterfire/tree/master/packages version: 0.2.1 environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" flutter: ">=1.9.1+hotfix.5" dependencies: diff --git a/packages/firebase_messaging/firebase_messaging/example/pubspec.yaml b/packages/firebase_messaging/firebase_messaging/example/pubspec.yaml index c6e8b2253c80..32970ee93bf9 100644 --- a/packages/firebase_messaging/firebase_messaging/example/pubspec.yaml +++ b/packages/firebase_messaging/firebase_messaging/example/pubspec.yaml @@ -2,7 +2,7 @@ name: firebase_messaging_example description: Demonstrates how to use the firebase_messaging plugin. environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" flutter: ">=1.12.13+hotfix.5" dependencies: diff --git a/packages/firebase_messaging/firebase_messaging/pubspec.yaml b/packages/firebase_messaging/firebase_messaging/pubspec.yaml index 8be41cca6b8f..80bed1c46a79 100644 --- a/packages/firebase_messaging/firebase_messaging/pubspec.yaml +++ b/packages/firebase_messaging/firebase_messaging/pubspec.yaml @@ -9,7 +9,7 @@ false_secrets: - example/** environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.16.0 <3.0.0' flutter: ">=1.12.13+hotfix.5" dependencies: diff --git a/packages/firebase_messaging/firebase_messaging_platform_interface/pubspec.yaml b/packages/firebase_messaging/firebase_messaging_platform_interface/pubspec.yaml index 624c14f3cfd0..739624ca9ef5 100644 --- a/packages/firebase_messaging/firebase_messaging_platform_interface/pubspec.yaml +++ b/packages/firebase_messaging/firebase_messaging_platform_interface/pubspec.yaml @@ -5,7 +5,7 @@ homepage: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/f repository: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_messaging/firebase_messaging_platform_interface environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.16.0 <3.0.0' flutter: ">=1.9.1+hotfix.5" dependencies: diff --git a/packages/firebase_messaging/firebase_messaging_web/pubspec.yaml b/packages/firebase_messaging/firebase_messaging_web/pubspec.yaml index 9664c627023d..fc65fd4b2ab8 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/FirebaseExtended/flutterfire/tree/master/packages version: 2.2.8 environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.16.0 <3.0.0' flutter: ">=1.12.13+hotfix.4" dependencies: diff --git a/packages/firebase_ml_model_downloader/firebase_ml_model_downloader/example/pubspec.yaml b/packages/firebase_ml_model_downloader/firebase_ml_model_downloader/example/pubspec.yaml index ac9c30255820..00a2ba79c78b 100644 --- a/packages/firebase_ml_model_downloader/firebase_ml_model_downloader/example/pubspec.yaml +++ b/packages/firebase_ml_model_downloader/firebase_ml_model_downloader/example/pubspec.yaml @@ -6,7 +6,7 @@ description: Demonstrates how to use the firebase_ml_model_downloader plugin. publish_to: "none" # Remove this line if you wish to publish to pub.dev environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.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_ml_model_downloader/firebase_ml_model_downloader/pubspec.yaml b/packages/firebase_ml_model_downloader/firebase_ml_model_downloader/pubspec.yaml index 73de47113098..d04e02c97181 100644 --- a/packages/firebase_ml_model_downloader/firebase_ml_model_downloader/pubspec.yaml +++ b/packages/firebase_ml_model_downloader/firebase_ml_model_downloader/pubspec.yaml @@ -8,7 +8,7 @@ false_secrets: - example/** environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.16.0 <3.0.0' flutter: '>=1.20.0' dependencies: diff --git a/packages/firebase_ml_model_downloader/firebase_ml_model_downloader_platform_interface/pubspec.yaml b/packages/firebase_ml_model_downloader/firebase_ml_model_downloader_platform_interface/pubspec.yaml index 8e2a8fae5003..5f256f0f70b0 100644 --- a/packages/firebase_ml_model_downloader/firebase_ml_model_downloader_platform_interface/pubspec.yaml +++ b/packages/firebase_ml_model_downloader/firebase_ml_model_downloader_platform_interface/pubspec.yaml @@ -5,7 +5,7 @@ homepage: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/f repository: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_ml_model_downloader/firebase_ml_model_downloader_platform_interface environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" flutter: ">=1.17.0" dependencies: diff --git a/packages/firebase_performance/firebase_performance/example/pubspec.yaml b/packages/firebase_performance/firebase_performance/example/pubspec.yaml index fb75a3139ac0..6d40615ac644 100644 --- a/packages/firebase_performance/firebase_performance/example/pubspec.yaml +++ b/packages/firebase_performance/firebase_performance/example/pubspec.yaml @@ -4,7 +4,7 @@ version: 0.0.1 publish_to: none environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" dependencies: firebase_core: diff --git a/packages/firebase_performance/firebase_performance/pubspec.yaml b/packages/firebase_performance/firebase_performance/pubspec.yaml index afa66bfdeccf..29c2c87854d4 100644 --- a/packages/firebase_performance/firebase_performance/pubspec.yaml +++ b/packages/firebase_performance/firebase_performance/pubspec.yaml @@ -11,7 +11,7 @@ false_secrets: - example/** environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" flutter: ">=1.12.13+hotfix.5" dependencies: diff --git a/packages/firebase_performance/firebase_performance_platform_interface/pubspec.yaml b/packages/firebase_performance/firebase_performance_platform_interface/pubspec.yaml index 40a9cc8cc088..3e7608e44d7d 100644 --- a/packages/firebase_performance/firebase_performance_platform_interface/pubspec.yaml +++ b/packages/firebase_performance/firebase_performance_platform_interface/pubspec.yaml @@ -4,7 +4,7 @@ version: 0.1.1 homepage: https://firebase.flutter.dev/docs/performance/overview environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" flutter: ">=1.17.0" dependencies: diff --git a/packages/firebase_performance/firebase_performance_web/pubspec.yaml b/packages/firebase_performance/firebase_performance_web/pubspec.yaml index ee72627554da..d89602d85ab0 100644 --- a/packages/firebase_performance/firebase_performance_web/pubspec.yaml +++ b/packages/firebase_performance/firebase_performance_web/pubspec.yaml @@ -4,7 +4,7 @@ homepage: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/f version: 0.1.0+6 environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" flutter: ">=1.20.0" dependencies: diff --git a/packages/firebase_remote_config/firebase_remote_config/example/pubspec.yaml b/packages/firebase_remote_config/firebase_remote_config/example/pubspec.yaml index e2703eeda6f0..db8f1f9c2bfc 100644 --- a/packages/firebase_remote_config/firebase_remote_config/example/pubspec.yaml +++ b/packages/firebase_remote_config/firebase_remote_config/example/pubspec.yaml @@ -2,7 +2,7 @@ name: firebase_remote_config_example description: Demonstrates how to use the firebase_remote_config plugin. environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" flutter: ">=1.12.13+hotfix.5" dependencies: diff --git a/packages/firebase_remote_config/firebase_remote_config/pubspec.yaml b/packages/firebase_remote_config/firebase_remote_config/pubspec.yaml index ffca0ae8d71f..635fc9df801f 100644 --- a/packages/firebase_remote_config/firebase_remote_config/pubspec.yaml +++ b/packages/firebase_remote_config/firebase_remote_config/pubspec.yaml @@ -10,7 +10,7 @@ false_secrets: - example/** environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" flutter: ">=1.12.13+hotfix.5" dependencies: diff --git a/packages/firebase_remote_config/firebase_remote_config_platform_interface/pubspec.yaml b/packages/firebase_remote_config/firebase_remote_config_platform_interface/pubspec.yaml index 7c579e6c6017..beb22973ddad 100644 --- a/packages/firebase_remote_config/firebase_remote_config_platform_interface/pubspec.yaml +++ b/packages/firebase_remote_config/firebase_remote_config_platform_interface/pubspec.yaml @@ -7,7 +7,7 @@ repository: https://github.com/FirebaseExtended/flutterfire/tree/master/packages version: 1.1.0 environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" flutter: ">=1.9.1+hotfix.5" dependencies: 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 c5731ae0b331..a111a858c56e 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/FirebaseExtended/flutterfire/tree/master/packages version: 1.0.6 environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" flutter: ">=1.20.0" dependencies: diff --git a/packages/firebase_storage/firebase_storage/example/pubspec.yaml b/packages/firebase_storage/firebase_storage/example/pubspec.yaml index 877d1be951d4..a0388c83b4a4 100755 --- a/packages/firebase_storage/firebase_storage/example/pubspec.yaml +++ b/packages/firebase_storage/firebase_storage/example/pubspec.yaml @@ -2,7 +2,7 @@ name: firebase_storage_example description: Demonstrates how to use the firebase_storage plugin. environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.16.0 <3.0.0' dependencies: firebase_core: diff --git a/packages/firebase_storage/firebase_storage/pubspec.yaml b/packages/firebase_storage/firebase_storage/pubspec.yaml index 8eab1efd33d7..ac8c2f9a434c 100755 --- a/packages/firebase_storage/firebase_storage/pubspec.yaml +++ b/packages/firebase_storage/firebase_storage/pubspec.yaml @@ -9,7 +9,7 @@ false_secrets: - example/** environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" flutter: ">=1.12.13+hotfix.5" dependencies: diff --git a/packages/firebase_storage/firebase_storage_platform_interface/pubspec.yaml b/packages/firebase_storage/firebase_storage_platform_interface/pubspec.yaml index 0160a2bd1def..21e43e0ac94b 100644 --- a/packages/firebase_storage/firebase_storage_platform_interface/pubspec.yaml +++ b/packages/firebase_storage/firebase_storage_platform_interface/pubspec.yaml @@ -4,7 +4,7 @@ version: 4.1.0 homepage: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_storage/firebase_storage_platform_interface repository: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_storage/firebase_storage_platform_interface environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.16.0 <3.0.0' flutter: ">=1.9.1+hotfix.5" dependencies: diff --git a/packages/firebase_storage/firebase_storage_web/lib/src/interop/storage.dart b/packages/firebase_storage/firebase_storage_web/lib/src/interop/storage.dart index 8b12aa784af1..02b0aeeaf499 100644 --- a/packages/firebase_storage/firebase_storage_web/lib/src/interop/storage.dart +++ b/packages/firebase_storage/firebase_storage_web/lib/src/interop/storage.dart @@ -539,6 +539,7 @@ class ListResult extends JsObjectWrapper { /// Objects in this directory. You can call [getMetadata()] and /// [getDownloadUrl()] on them. List get items => jsObject.items + // ignore: unnecessary_lambdas, false positive, data is dynamic .map((dynamic data) => StorageReference._fromJsObject(data)) .toList(); @@ -552,6 +553,7 @@ class ListResult extends JsObjectWrapper { /// if a bucket has two objects '/a/b/1' and '/a/b/2', [list('/a')] will /// return '/a/b' as a prefix. List get prefixes => jsObject.prefixes + // ignore: unnecessary_lambdas, false positive, data is dynamic .map((dynamic data) => StorageReference._fromJsObject(data)) .toList(); diff --git a/packages/firebase_storage/firebase_storage_web/pubspec.yaml b/packages/firebase_storage/firebase_storage_web/pubspec.yaml index 1b1cecfa7eac..41250b547662 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/FirebaseExtended/flutterfire/tree/master/packages version: 3.2.9 environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" flutter: ">=1.20.0" dependencies: diff --git a/packages/flutterfire_ui/example/pubspec.yaml b/packages/flutterfire_ui/example/pubspec.yaml index 10fbe89bf5eb..dbb9a67ef435 100644 --- a/packages/flutterfire_ui/example/pubspec.yaml +++ b/packages/flutterfire_ui/example/pubspec.yaml @@ -18,7 +18,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.16.0 <3.0.0' dependencies: cloud_firestore: ^3.1.9 diff --git a/packages/flutterfire_ui/pubspec.yaml b/packages/flutterfire_ui/pubspec.yaml index 9d80c8e9acab..8ee723ea895b 100644 --- a/packages/flutterfire_ui/pubspec.yaml +++ b/packages/flutterfire_ui/pubspec.yaml @@ -8,7 +8,7 @@ false_secrets: - example/** environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.16.0 <3.0.0' flutter: '>=1.17.0' dependencies: diff --git a/tests/pubspec.yaml b/tests/pubspec.yaml index 00f514014c66..44b1007b693e 100644 --- a/tests/pubspec.yaml +++ b/tests/pubspec.yaml @@ -5,7 +5,7 @@ publish_to: "none" version: 1.0.0+1 environment: - sdk: ">=2.15.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" dependencies: cloud_firestore: From 5ae7a5bc653ac8d3e98cdcba2aac0c452a4dfbeb Mon Sep 17 00:00:00 2001 From: Remi Rousselet Date: Fri, 25 Feb 2022 13:33:02 +0100 Subject: [PATCH 2/3] Use dart:html Notification --- .../lib/firebase_messaging_web.dart | 6 +++--- .../lib/src/interop/notification.dart | 21 ------------------- .../lib/src/interop/notification_interop.dart | 18 ---------------- .../firebase_messaging_web/lib/src/utils.dart | 4 ++-- 4 files changed, 5 insertions(+), 44 deletions(-) delete mode 100644 packages/firebase_messaging/firebase_messaging_web/lib/src/interop/notification.dart delete mode 100644 packages/firebase_messaging/firebase_messaging_web/lib/src/interop/notification_interop.dart 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 df697eaa3c6a..b4aada403ec6 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 @@ -4,6 +4,7 @@ // BSD-style license that can be found in the LICENSE file. import 'dart:async'; +import 'dart:html'; import 'package:firebase_core/firebase_core.dart'; import 'package:firebase_core_web/firebase_core_web.dart'; @@ -14,7 +15,6 @@ import 'package:flutter_web_plugins/flutter_web_plugins.dart'; import 'src/internals.dart'; import 'src/interop/messaging.dart' as messaging_interop; -import 'src/interop/notification.dart'; import 'src/utils.dart' as utils; /// Web implementation for [FirebaseMessagingPlatform] @@ -129,7 +129,7 @@ class FirebaseMessagingWeb extends FirebaseMessagingPlatform { @override Future getNotificationSettings() async { - return utils.getNotificationSettings(WindowNotification.permission); + return utils.getNotificationSettings(Notification.permission); } @override @@ -143,7 +143,7 @@ class FirebaseMessagingWeb extends FirebaseMessagingPlatform { bool sound = true, }) { return convertWebExceptions(() async { - String status = await WindowNotification.requestPermission(); + String status = await Notification.requestPermission(); return utils.getNotificationSettings(status); }); } diff --git a/packages/firebase_messaging/firebase_messaging_web/lib/src/interop/notification.dart b/packages/firebase_messaging/firebase_messaging_web/lib/src/interop/notification.dart deleted file mode 100644 index 2bf40b2f2d36..000000000000 --- a/packages/firebase_messaging/firebase_messaging_web/lib/src/interop/notification.dart +++ /dev/null @@ -1,21 +0,0 @@ -// ignore_for_file: require_trailing_commas -// Copyright 2020, the Chromium project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -// ignore_for_file: public_member_api_docs - -import 'package:firebase_core_web/firebase_core_web_interop.dart'; - -import 'notification_interop.dart' as notification_interop; - -class WindowNotification { - static Future requestPermission() { - return handleThenable( - notification_interop.NotificationJsImpl.requestPermission()); - } - - static String get permission { - return notification_interop.NotificationJsImpl.permission; - } -} diff --git a/packages/firebase_messaging/firebase_messaging_web/lib/src/interop/notification_interop.dart b/packages/firebase_messaging/firebase_messaging_web/lib/src/interop/notification_interop.dart deleted file mode 100644 index ebc834c93795..000000000000 --- a/packages/firebase_messaging/firebase_messaging_web/lib/src/interop/notification_interop.dart +++ /dev/null @@ -1,18 +0,0 @@ -// ignore_for_file: require_trailing_commas -// Copyright 2020, the Chromium project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -// ignore_for_file: public_member_api_docs - -@JS() -library firebase.notification_interop; - -import 'package:firebase_core_web/firebase_core_web_interop.dart'; -import 'package:js/js.dart'; - -@JS('Notification') -abstract class NotificationJsImpl { - external static PromiseJsImpl requestPermission(); - external static String get permission; -} diff --git a/packages/firebase_messaging/firebase_messaging_web/lib/src/utils.dart b/packages/firebase_messaging/firebase_messaging_web/lib/src/utils.dart index 674a0adaacd6..1481f9fa607d 100644 --- a/packages/firebase_messaging/firebase_messaging_web/lib/src/utils.dart +++ b/packages/firebase_messaging/firebase_messaging_web/lib/src/utils.dart @@ -11,7 +11,7 @@ import 'interop/messaging.dart'; /// /// See https://developer.mozilla.org/en-US/docs/Web/API/Notification/requestPermission /// for more information. -AuthorizationStatus convertToAuthorizationStatus(String status) { +AuthorizationStatus convertToAuthorizationStatus(String? status) { switch (status) { case 'granted': return AuthorizationStatus.authorized; @@ -25,7 +25,7 @@ AuthorizationStatus convertToAuthorizationStatus(String status) { } /// Returns a [NotificationSettings] instance for all Web platforms devices. -NotificationSettings getNotificationSettings(String status) { +NotificationSettings getNotificationSettings(String? status) { return NotificationSettings( authorizationStatus: convertToAuthorizationStatus(status), alert: AppleNotificationSetting.notSupported, From f662944367b11e015c6cf6f838e26b0c1bbbb38f Mon Sep 17 00:00:00 2001 From: Salakar Date: Fri, 25 Feb 2022 13:37:12 +0000 Subject: [PATCH 3/3] update odm docs --- docs/firestore-odm/overview.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/firestore-odm/overview.mdx b/docs/firestore-odm/overview.mdx index 886c4a53cf27..aad45d929ef6 100644 --- a/docs/firestore-odm/overview.mdx +++ b/docs/firestore-odm/overview.mdx @@ -38,7 +38,7 @@ That is done by adding the following to your `pubspec.yaml`: ```yaml environment: - sdk: ">=2.14.0 <3.0.0" + sdk: ">=2.16.0 <3.0.0" ``` ### 2. FlutterFire Initialization