From e0087c845c7526c11a4241a26d39d4673b0ad29d Mon Sep 17 00:00:00 2001 From: Guillaume Bernos Date: Tue, 31 Jan 2023 10:38:04 +0100 Subject: [PATCH] refactor: upgrade project to remove warnings from Flutter 3.7 (#10344) * refactor: remove deprecated lints in Flutter 3.7 * refactor: remove deprecated lints in Flutter 3.7 * refactor: remove deprecated lints in Flutter 3.7 * refactor: remove deprecated lints in Flutter 3.7 * refactor: remove deprecated lints in Flutter 3.7 * refactor: remove deprecated lints in Flutter 3.7 * refactor: remove deprecated lints in Flutter 3.7 * refactor: remove deprecated lints in Flutter 3.7 --- .github/workflows/e2e_tests.yaml | 3 +- .github/workflows/firebase_firestore.yaml | 3 +- analysis_options.yaml | 4 - .../cloud_firestore/dartpad/lib/main.dart | 4 +- .../cloud_firestore/example/lib/main.dart | 2 +- .../macos/Runner.xcodeproj/project.pbxproj | 9 +- .../cloud_firestore_platform_interface.dart | 3 - .../lib/src/settings.dart | 2 +- .../lib/src/interop/firestore_interop.dart | 4 +- .../cloud_firestore_odm/analysis_options.yaml | 4 - .../example/lib/integration.dart | 4 +- .../example/lib/movies_screen.dart | 2 +- .../lib/simple.dart | 5 +- .../lib/src/collection_data.dart | 16 +- .../lib/src/templates/query_reference.dart | 2 +- .../lib/src/validator_generator.dart | 6 +- .../pubspec.yaml | 2 +- .../macos/Runner.xcodeproj/project.pbxproj | 6 +- .../macos/Runner.xcodeproj/project.pbxproj | 6 +- .../macos/Runner.xcodeproj/project.pbxproj | 6 +- .../firebase_auth/example/lib/auth.dart | 7 +- .../firebase_auth/example/lib/main.dart | 5 +- .../macos/Runner.xcodeproj/project.pbxproj | 6 +- .../lib/src/id_token_result.dart | 2 +- .../lib/src/user_metadata.dart | 2 +- .../test/additional_user_info_test.dart | 2 +- .../test/id_token_result_test.dart | 2 +- .../test/user_metadata_test.dart | 2 +- .../macos/Runner.xcodeproj/project.pbxproj | 6 +- .../lib/src/firebase_exception.dart | 2 +- .../macos/Runner.xcodeproj/project.pbxproj | 6 +- .../firebase_database/example/lib/main.dart | 2 +- .../macos/Runner.xcodeproj/project.pbxproj | 6 +- .../macos/Runner.xcodeproj/project.pbxproj | 6 +- .../macos/Runner.xcodeproj/project.pbxproj | 6 +- .../macos/Runner.xcodeproj/project.pbxproj | 6 +- .../example/analysis_options.yaml | 1 - .../macos/Runner.xcodeproj/project.pbxproj | 6 +- .../firebase_ui_auth/analysis_options.yaml | 6 +- .../macos/Runner.xcodeproj/project.pbxproj | 6 +- .../lib/firebase_ui_auth.dart | 137 ++++++++---------- .../lib/src/views/login_view.dart | 12 +- .../src/widgets/delete_account_button.dart | 5 +- .../lib/src/widgets/error_text.dart | 7 +- .../src/widgets/internal/loading_button.dart | 4 +- .../lib/src/widgets/internal/subtitle.dart | 3 +- .../lib/src/widgets/internal/title.dart | 2 +- .../lib/src/widgets/sms_code_input.dart | 7 +- .../macos/Runner.xcodeproj/project.pbxproj | 6 +- .../lib/src/table_builder.dart | 2 +- .../example/lib/main.dart | 4 +- .../macos/Runner.xcodeproj/project.pbxproj | 6 +- .../lib/src/table_builder.dart | 4 +- .../macos/Runner.xcodeproj/project.pbxproj | 6 +- .../macos/Runner.xcodeproj/project.pbxproj | 12 +- tests/lib/main.dart | 84 +---------- tests/macos/Runner.xcodeproj/project.pbxproj | 21 +-- 57 files changed, 197 insertions(+), 305 deletions(-) diff --git a/.github/workflows/e2e_tests.yaml b/.github/workflows/e2e_tests.yaml index 951fe9e71893..8df7be44aef2 100644 --- a/.github/workflows/e2e_tests.yaml +++ b/.github/workflows/e2e_tests.yaml @@ -223,7 +223,8 @@ jobs: restore-keys: firebase-emulators-v1 - uses: subosito/flutter-action@v2 with: - channel: 'stable' + # TODO(Lyokone): upgrade to stable when https://github.com/flutter/flutter/issues/118469 is closed + flutter-version: '3.3.10' cache: true - uses: bluefireteam/melos-action@v2 with: diff --git a/.github/workflows/firebase_firestore.yaml b/.github/workflows/firebase_firestore.yaml index 6a48ded29b6a..4eaf01463458 100644 --- a/.github/workflows/firebase_firestore.yaml +++ b/.github/workflows/firebase_firestore.yaml @@ -71,7 +71,8 @@ jobs: java-version: '11' - uses: subosito/flutter-action@v2 with: - channel: 'stable' + # TODO(Lyokone): upgrade to stable when https://github.com/flutter/flutter/issues/118469 is closed + flutter-version: '3.3.10' cache: true - uses: bluefireteam/melos-action@v1 with: diff --git a/analysis_options.yaml b/analysis_options.yaml index 79a2ff5aa9f7..2156d3804df6 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -74,10 +74,6 @@ linter: # and `@required Widget child` last. always_put_required_named_parameters_first: false - # `as` is not that bad (especially with the upcoming non-nullable types). - # Explicit exceptions is better than implicit exceptions. - avoid_as: false - # This project doesn't use Flutter-style todos flutter_style_todos: false diff --git a/packages/cloud_firestore/cloud_firestore/dartpad/lib/main.dart b/packages/cloud_firestore/cloud_firestore/dartpad/lib/main.dart index 605569fd3dd2..c1be71a77781 100644 --- a/packages/cloud_firestore/cloud_firestore/dartpad/lib/main.dart +++ b/packages/cloud_firestore/cloud_firestore/dartpad/lib/main.dart @@ -3,8 +3,8 @@ // 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. -import 'package:firebase_core/firebase_core.dart'; import 'package:cloud_firestore/cloud_firestore.dart'; +import 'package:firebase_core/firebase_core.dart'; import 'package:flutter/material.dart'; Future main() async { @@ -100,7 +100,7 @@ class _FilmListState extends State { builder: (context, _) { return Text( 'Latest Snapshot: ${DateTime.now()}', - style: Theme.of(context).textTheme.caption, + style: Theme.of(context).textTheme.bodySmall, ); }, ) diff --git a/packages/cloud_firestore/cloud_firestore/example/lib/main.dart b/packages/cloud_firestore/cloud_firestore/example/lib/main.dart index 558125cad762..26938261f784 100755 --- a/packages/cloud_firestore/cloud_firestore/example/lib/main.dart +++ b/packages/cloud_firestore/cloud_firestore/example/lib/main.dart @@ -109,7 +109,7 @@ class _FilmListState extends State { builder: (context, _) { return Text( 'Latest Snapshot: ${DateTime.now()}', - style: Theme.of(context).textTheme.caption, + style: Theme.of(context).textTheme.bodySmall, ); }, ) diff --git a/packages/cloud_firestore/cloud_firestore/example/macos/Runner.xcodeproj/project.pbxproj b/packages/cloud_firestore/cloud_firestore/example/macos/Runner.xcodeproj/project.pbxproj index 2b75fde6c805..85ac458f538a 100644 --- a/packages/cloud_firestore/cloud_firestore/example/macos/Runner.xcodeproj/project.pbxproj +++ b/packages/cloud_firestore/cloud_firestore/example/macos/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 51; + objectVersion = 54; objects = { /* Begin PBXAggregateTarget section */ @@ -260,6 +260,7 @@ /* Begin PBXShellScriptBuildPhase section */ 3399D490228B24CF009A79C7 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -425,7 +426,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -505,7 +506,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -552,7 +553,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/packages/cloud_firestore/cloud_firestore_platform_interface/lib/cloud_firestore_platform_interface.dart b/packages/cloud_firestore/cloud_firestore_platform_interface/lib/cloud_firestore_platform_interface.dart index d0580ca3500e..ee12cbb1288c 100644 --- a/packages/cloud_firestore/cloud_firestore_platform_interface/lib/cloud_firestore_platform_interface.dart +++ b/packages/cloud_firestore/cloud_firestore_platform_interface/lib/cloud_firestore_platform_interface.dart @@ -15,7 +15,6 @@ export 'src/field_path.dart'; export 'src/geo_point.dart'; export 'src/get_options.dart'; export 'src/load_bundle_task_state.dart'; -export 'src/load_bundle_task_state.dart'; export 'src/persistence_settings.dart'; export 'src/platform_interface/platform_interface_aggregate_query.dart'; export 'src/platform_interface/platform_interface_aggregate_query_snapshot.dart'; @@ -28,8 +27,6 @@ export 'src/platform_interface/platform_interface_field_value_factory.dart'; export 'src/platform_interface/platform_interface_firestore.dart'; export 'src/platform_interface/platform_interface_index_definitions.dart'; export 'src/platform_interface/platform_interface_load_bundle_task.dart'; -export 'src/platform_interface/platform_interface_load_bundle_task.dart'; -export 'src/platform_interface/platform_interface_load_bundle_task_snapshot.dart'; export 'src/platform_interface/platform_interface_load_bundle_task_snapshot.dart'; export 'src/platform_interface/platform_interface_query.dart'; export 'src/platform_interface/platform_interface_query_snapshot.dart'; diff --git a/packages/cloud_firestore/cloud_firestore_platform_interface/lib/src/settings.dart b/packages/cloud_firestore/cloud_firestore_platform_interface/lib/src/settings.dart index e50f5c929402..7ae8e1d70685 100644 --- a/packages/cloud_firestore/cloud_firestore_platform_interface/lib/src/settings.dart +++ b/packages/cloud_firestore/cloud_firestore_platform_interface/lib/src/settings.dart @@ -100,5 +100,5 @@ class Settings { ); @override - String toString() => 'Settings(${asMap.toString()})'; + String toString() => 'Settings($asMap)'; } 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 ba5c16a3b4e7..d872680c9a43 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 @@ -239,7 +239,6 @@ abstract class FirestoreJsImpl { // TODO how? // external void settings(Settings settings); - } @JS('WriteBatch') @@ -480,7 +479,8 @@ abstract class TimestampJsImpl { @anonymous @JS() abstract class FirestoreError { - external String /*|'cancelled'|'unknown'|'invalid-argument'|'deadline-exceeded'|'not-found'|'already-exists'|'permission-denied'|'resource-exhausted'|'failed-precondition'|'aborted'|'out-of-range'|'unimplemented'|'internal'|'unavailable'|'data-loss'|'unauthenticated'*/ get code; + external String /*|'cancelled'|'unknown'|'invalid-argument'|'deadline-exceeded'|'not-found'|'already-exists'|'permission-denied'|'resource-exhausted'|'failed-precondition'|'aborted'|'out-of-range'|'unimplemented'|'internal'|'unavailable'|'data-loss'|'unauthenticated'*/ + get code; external set code( /*|'cancelled'|'unknown'|'invalid-argument'|'deadline-exceeded'|'not-found'|'already-exists'|'permission-denied'|'resource-exhausted'|'failed-precondition'|'aborted'|'out-of-range'|'unimplemented'|'internal'|'unavailable'|'data-loss'|'unauthenticated'*/ diff --git a/packages/cloud_firestore_odm/analysis_options.yaml b/packages/cloud_firestore_odm/analysis_options.yaml index b66c68d44d5b..8aa2ce5c8686 100644 --- a/packages/cloud_firestore_odm/analysis_options.yaml +++ b/packages/cloud_firestore_odm/analysis_options.yaml @@ -74,10 +74,6 @@ linter: # and `@required Widget child` last. always_put_required_named_parameters_first: false - # `as` is not that bad (especially with the upcoming non-nullable types). - # Explicit exceptions is better than implicit exceptions. - avoid_as: false - # This project doesn't use Flutter-style todos flutter_style_todos: false diff --git a/packages/cloud_firestore_odm/cloud_firestore_odm/example/lib/integration.dart b/packages/cloud_firestore_odm/cloud_firestore_odm/example/lib/integration.dart index 2511abfedc3a..bfdbc643ee48 100644 --- a/packages/cloud_firestore_odm/cloud_firestore_odm/example/lib/integration.dart +++ b/packages/cloud_firestore_odm/cloud_firestore_odm/example/lib/integration.dart @@ -44,7 +44,7 @@ class AdvancedJson { @JsonKey(name: 'LAST_NAME') final String? lastName; - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) final String? ignored; Map toJson() => _$AdvancedJsonToJson(this); @@ -77,7 +77,7 @@ class _PrivateAdvancedJson { @JsonKey(name: 'LAST_NAME') final String? lastName; - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) final String? ignored; Map toJson() => _$PrivateAdvancedJsonToJson(this); diff --git a/packages/cloud_firestore_odm/cloud_firestore_odm/example/lib/movies_screen.dart b/packages/cloud_firestore_odm/cloud_firestore_odm/example/lib/movies_screen.dart index 80f89226c956..8e20a19f3c50 100644 --- a/packages/cloud_firestore_odm/cloud_firestore_odm/example/lib/movies_screen.dart +++ b/packages/cloud_firestore_odm/cloud_firestore_odm/example/lib/movies_screen.dart @@ -72,7 +72,7 @@ class _FilmListState extends State { builder: (context, _) { return Text( 'Latest Snapshot: ${DateTime.now()}', - style: Theme.of(context).textTheme.caption, + style: Theme.of(context).textTheme.bodySmall, ); }, ) diff --git a/packages/cloud_firestore_odm/cloud_firestore_odm_generator/cloud_firestore_odm_generator_integration_test/lib/simple.dart b/packages/cloud_firestore_odm/cloud_firestore_odm_generator/cloud_firestore_odm_generator_integration_test/lib/simple.dart index 3a9494886464..e0ad3e4d34d9 100644 --- a/packages/cloud_firestore_odm/cloud_firestore_odm_generator/cloud_firestore_odm_generator_integration_test/lib/simple.dart +++ b/packages/cloud_firestore_odm/cloud_firestore_odm_generator/cloud_firestore_odm_generator_integration_test/lib/simple.dart @@ -5,6 +5,7 @@ import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:cloud_firestore_odm/cloud_firestore_odm.dart'; import 'package:json_annotation/json_annotation.dart'; + import 'model.dart'; part 'simple.g.dart'; @@ -20,10 +21,10 @@ class IgnoredGetter { int get count => 42; - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) int get count2 => 42; - @JsonKey(ignore: false) + @JsonKey(includeFromJson: true, includeToJson: true) int get count3 => 42; } diff --git a/packages/cloud_firestore_odm/cloud_firestore_odm_generator/lib/src/collection_data.dart b/packages/cloud_firestore_odm/cloud_firestore_odm_generator/lib/src/collection_data.dart index 27888f2c3673..8d89d25aac0b 100644 --- a/packages/cloud_firestore_odm/cloud_firestore_odm_generator/lib/src/collection_data.dart +++ b/packages/cloud_firestore_odm/cloud_firestore_odm_generator/lib/src/collection_data.dart @@ -116,7 +116,7 @@ class CollectionData with Names { final type = CollectionData.modelTypeOfAnnotation(annotation); final hasJsonSerializable = - jsonSerializableChecker.hasAnnotationOf(type.element2!); + jsonSerializableChecker.hasAnnotationOf(type.element!); if (type.isDynamic) { throw InvalidGenerationSourceError( @@ -126,7 +126,7 @@ class CollectionData with Names { ); } - final collectionTargetElement = type.element2; + final collectionTargetElement = type.element; if (collectionTargetElement is! ClassElement) { throw InvalidGenerationSourceError( 'The annotation @Collection can only receive classes as generic argument. ', @@ -134,7 +134,7 @@ class CollectionData with Names { ); } - final hasFreezed = freezedChecker.hasAnnotationOf(type.element2!); + final hasFreezed = freezedChecker.hasAnnotationOf(type.element!); final redirectedFreezedConstructors = collectionTargetElement.constructors.where( (element) { @@ -272,7 +272,7 @@ represents the content of the collection must be in the same file. if (hasFreezed) { key = // two $ because both Freezed and json_serializable add one - '_\$\$${redirectedFreezedConstructors.single.redirectedConstructor!.enclosingElement3.name}FieldMap[$key]!'; + '_\$\$${redirectedFreezedConstructors.single.redirectedConstructor!.enclosingElement.name}FieldMap[$key]!'; } else if (hasJsonSerializable) { key = '_\$${collectionTargetElement.name.public}FieldMap[$key]!'; } @@ -411,7 +411,7 @@ extension on ClassElement { for (final supertype in allSupertypes) { if (supertype.isDartCoreObject) continue; - for (final field in supertype.element2.fields) { + for (final field in supertype.element.fields) { if (field.getter != null && !field.getter!.isSynthetic) { continue; } @@ -431,10 +431,10 @@ extension on String { extension on DartType { bool get isJsonDocumentReference { - return element2?.librarySource?.uri.scheme == 'package' && + return element?.librarySource?.uri.scheme == 'package' && const {'cloud_firestore'} - .contains(element2?.librarySource?.uri.pathSegments.first) && - element2?.name == 'DocumentReference' && + .contains(element?.librarySource?.uri.pathSegments.first) && + element?.name == 'DocumentReference' && (this as InterfaceType).typeArguments.single.isDartCoreMap; } diff --git a/packages/cloud_firestore_odm/cloud_firestore_odm_generator/lib/src/templates/query_reference.dart b/packages/cloud_firestore_odm/cloud_firestore_odm_generator/lib/src/templates/query_reference.dart index ab2cbc7aedcd..8bd01b96cc72 100644 --- a/packages/cloud_firestore_odm/cloud_firestore_odm_generator/lib/src/templates/query_reference.dart +++ b/packages/cloud_firestore_odm/cloud_firestore_odm_generator/lib/src/templates/query_reference.dart @@ -449,7 +449,7 @@ class ${data.queryReferenceImplName} extension on TypeProvider { DartType asNullable(DartType type) { - final typeSystem = nullType.element2.library.typeSystem; + final typeSystem = nullType.element.library.typeSystem; if (typeSystem.isNullable(type)) return type; return typeSystem.leastUpperBound(type, nullType); diff --git a/packages/cloud_firestore_odm/cloud_firestore_odm_generator/lib/src/validator_generator.dart b/packages/cloud_firestore_odm/cloud_firestore_odm_generator/lib/src/validator_generator.dart index 888a3e86a4f1..44e7a89497b5 100644 --- a/packages/cloud_firestore_odm/cloud_firestore_odm_generator/lib/src/validator_generator.dart +++ b/packages/cloud_firestore_odm/cloud_firestore_odm_generator/lib/src/validator_generator.dart @@ -40,9 +40,9 @@ bool isValidatorAnnotation(ElementAnnotation annotation) { final element = annotation.element; if (element == null || element is! ConstructorElement) return false; - return element.enclosingElement3.allSupertypes.any((superType) { - return superType.element2.name == 'Validator' && - superType.element2.librarySource.uri.toString() == + return element.enclosingElement.allSupertypes.any((superType) { + return superType.element.name == 'Validator' && + superType.element.librarySource.uri.toString() == 'package:cloud_firestore_odm/src/validator.dart'; }); } 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 274f031cc12b..f8de17745d87 100644 --- a/packages/cloud_firestore_odm/cloud_firestore_odm_generator/pubspec.yaml +++ b/packages/cloud_firestore_odm/cloud_firestore_odm_generator/pubspec.yaml @@ -8,7 +8,7 @@ environment: sdk: ">=2.17.0 <3.0.0" dependencies: - analyzer: ">=4.6.0 <6.0.0" + analyzer: ">=5.4.0 <6.0.0" build: ^2.0.1 build_config: ^1.0.0 cloud_firestore_odm: ^1.0.0-dev.45 diff --git a/packages/cloud_functions/cloud_functions/example/macos/Runner.xcodeproj/project.pbxproj b/packages/cloud_functions/cloud_functions/example/macos/Runner.xcodeproj/project.pbxproj index 90e78338be75..4c3e269ccbc9 100644 --- a/packages/cloud_functions/cloud_functions/example/macos/Runner.xcodeproj/project.pbxproj +++ b/packages/cloud_functions/cloud_functions/example/macos/Runner.xcodeproj/project.pbxproj @@ -409,7 +409,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -494,7 +494,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -541,7 +541,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/packages/firebase_analytics/firebase_analytics/example/macos/Runner.xcodeproj/project.pbxproj b/packages/firebase_analytics/firebase_analytics/example/macos/Runner.xcodeproj/project.pbxproj index 06c1207aa015..b1f846b1f032 100644 --- a/packages/firebase_analytics/firebase_analytics/example/macos/Runner.xcodeproj/project.pbxproj +++ b/packages/firebase_analytics/firebase_analytics/example/macos/Runner.xcodeproj/project.pbxproj @@ -407,7 +407,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -487,7 +487,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -534,7 +534,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/packages/firebase_app_installations/firebase_app_installations/example/macos/Runner.xcodeproj/project.pbxproj b/packages/firebase_app_installations/firebase_app_installations/example/macos/Runner.xcodeproj/project.pbxproj index fe09e2881b64..90ee454035e0 100644 --- a/packages/firebase_app_installations/firebase_app_installations/example/macos/Runner.xcodeproj/project.pbxproj +++ b/packages/firebase_app_installations/firebase_app_installations/example/macos/Runner.xcodeproj/project.pbxproj @@ -407,7 +407,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -487,7 +487,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -534,7 +534,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/packages/firebase_auth/firebase_auth/example/lib/auth.dart b/packages/firebase_auth/firebase_auth/example/lib/auth.dart index 47f8f2adf604..ae7c39869084 100644 --- a/packages/firebase_auth/firebase_auth/example/lib/auth.dart +++ b/packages/firebase_auth/firebase_auth/example/lib/auth.dart @@ -137,7 +137,8 @@ class _AuthGateState extends State { Visibility( visible: error.isNotEmpty, child: MaterialBanner( - backgroundColor: Theme.of(context).errorColor, + backgroundColor: + Theme.of(context).colorScheme.error, content: SelectableText(error), actions: [ TextButton( @@ -274,7 +275,7 @@ class _AuthGateState extends State { if (mode != AuthMode.phone) RichText( text: TextSpan( - style: Theme.of(context).textTheme.bodyText1, + style: Theme.of(context).textTheme.bodyLarge, children: [ TextSpan( text: mode == AuthMode.login @@ -301,7 +302,7 @@ class _AuthGateState extends State { const SizedBox(height: 10), RichText( text: TextSpan( - style: Theme.of(context).textTheme.bodyText1, + style: Theme.of(context).textTheme.bodyLarge, children: [ const TextSpan(text: 'Or '), TextSpan( diff --git a/packages/firebase_auth/firebase_auth/example/lib/main.dart b/packages/firebase_auth/firebase_auth/example/lib/main.dart index 2f05bb8c770d..654e445d0fc5 100755 --- a/packages/firebase_auth/firebase_auth/example/lib/main.dart +++ b/packages/firebase_auth/firebase_auth/example/lib/main.dart @@ -7,9 +7,8 @@ import 'package:firebase_core/firebase_core.dart'; import 'package:flutter/material.dart'; import 'auth.dart'; -import 'profile.dart'; - import 'firebase_options.dart'; +import 'profile.dart'; /// Requires that a Firebase local emulator is running locally. /// See https://firebase.flutter.dev/docs/auth/start/#optional-prototype-and-test-with-firebase-local-emulator-suite @@ -61,7 +60,7 @@ class AuthExampleApp extends StatelessWidget { children: [ Text( 'Firebase Auth Desktop', - style: Theme.of(context).textTheme.headline4, + style: Theme.of(context).textTheme.headlineMedium, ), ], ), diff --git a/packages/firebase_auth/firebase_auth/example/macos/Runner.xcodeproj/project.pbxproj b/packages/firebase_auth/firebase_auth/example/macos/Runner.xcodeproj/project.pbxproj index 36537b32799e..19e959a53be0 100644 --- a/packages/firebase_auth/firebase_auth/example/macos/Runner.xcodeproj/project.pbxproj +++ b/packages/firebase_auth/firebase_auth/example/macos/Runner.xcodeproj/project.pbxproj @@ -428,7 +428,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -514,7 +514,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -561,7 +561,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/packages/firebase_auth/firebase_auth_platform_interface/lib/src/id_token_result.dart b/packages/firebase_auth/firebase_auth_platform_interface/lib/src/id_token_result.dart index f70e51e5138c..5fec5b46bef1 100644 --- a/packages/firebase_auth/firebase_auth_platform_interface/lib/src/id_token_result.dart +++ b/packages/firebase_auth/firebase_auth_platform_interface/lib/src/id_token_result.dart @@ -51,6 +51,6 @@ class IdTokenResult { @override String toString() { - return '$IdTokenResult(authTime: $authTime, claims: ${claims.toString()}, expirationTime: $expirationTime, issuedAtTime: $issuedAtTime, signInProvider: $signInProvider, token: $token)'; + return '$IdTokenResult(authTime: $authTime, claims: $claims, expirationTime: $expirationTime, issuedAtTime: $issuedAtTime, signInProvider: $signInProvider, token: $token)'; } } diff --git a/packages/firebase_auth/firebase_auth_platform_interface/lib/src/user_metadata.dart b/packages/firebase_auth/firebase_auth_platform_interface/lib/src/user_metadata.dart index d2db8b25a1c0..85c444e87838 100644 --- a/packages/firebase_auth/firebase_auth_platform_interface/lib/src/user_metadata.dart +++ b/packages/firebase_auth/firebase_auth_platform_interface/lib/src/user_metadata.dart @@ -29,6 +29,6 @@ class UserMetadata { @override String toString() { - return 'UserMetadata(creationTime: ${creationTime.toString()}, lastSignInTime: ${lastSignInTime.toString()})'; + return 'UserMetadata(creationTime: $creationTime, lastSignInTime: $lastSignInTime)'; } } diff --git a/packages/firebase_auth/firebase_auth_platform_interface/test/additional_user_info_test.dart b/packages/firebase_auth/firebase_auth_platform_interface/test/additional_user_info_test.dart index 4a1b3f8c4e95..d9a2816c952e 100644 --- a/packages/firebase_auth/firebase_auth_platform_interface/test/additional_user_info_test.dart +++ b/packages/firebase_auth/firebase_auth_platform_interface/test/additional_user_info_test.dart @@ -39,7 +39,7 @@ void main() { expect( result, equals( - '$AdditionalUserInfo(isNewUser: $kMockIsNewUser, profile: ${kMockProfile.toString()}, providerId: $kMockProviderId, username: $kMockUsername)')); + '$AdditionalUserInfo(isNewUser: $kMockIsNewUser, profile: $kMockProfile, providerId: $kMockProviderId, username: $kMockUsername)')); }); }); }); diff --git a/packages/firebase_auth/firebase_auth_platform_interface/test/id_token_result_test.dart b/packages/firebase_auth/firebase_auth_platform_interface/test/id_token_result_test.dart index a642a0e6c87a..dbfbe867ac55 100644 --- a/packages/firebase_auth/firebase_auth_platform_interface/test/id_token_result_test.dart +++ b/packages/firebase_auth/firebase_auth_platform_interface/test/id_token_result_test.dart @@ -59,7 +59,7 @@ void main() { test('toString()', () { expect(idTokenResult.toString(), - '$IdTokenResult(authTime: ${idTokenResult.authTime}, claims: ${kMockClaims.toString()}, expirationTime: ${idTokenResult.expirationTime}, issuedAtTime: ${idTokenResult.issuedAtTime}, signInProvider: $kMockSignInProvider, token: $kMockToken)'); + '$IdTokenResult(authTime: ${idTokenResult.authTime}, claims: $kMockClaims, expirationTime: ${idTokenResult.expirationTime}, issuedAtTime: ${idTokenResult.issuedAtTime}, signInProvider: $kMockSignInProvider, token: $kMockToken)'); }); }); } diff --git a/packages/firebase_auth/firebase_auth_platform_interface/test/user_metadata_test.dart b/packages/firebase_auth/firebase_auth_platform_interface/test/user_metadata_test.dart index af8e95e49956..88aac25b802a 100644 --- a/packages/firebase_auth/firebase_auth_platform_interface/test/user_metadata_test.dart +++ b/packages/firebase_auth/firebase_auth_platform_interface/test/user_metadata_test.dart @@ -53,7 +53,7 @@ void main() { test('toString()', () { expect(userMetadata.toString(), - 'UserMetadata(creationTime: ${userMetadata.creationTime.toString()}, lastSignInTime: ${userMetadata.lastSignInTime.toString()})'); + 'UserMetadata(creationTime: ${userMetadata.creationTime}, lastSignInTime: ${userMetadata.lastSignInTime})'); }); }); } diff --git a/packages/firebase_core/firebase_core/example/macos/Runner.xcodeproj/project.pbxproj b/packages/firebase_core/firebase_core/example/macos/Runner.xcodeproj/project.pbxproj index e658a33d6b7b..fb2a85c5a91a 100644 --- a/packages/firebase_core/firebase_core/example/macos/Runner.xcodeproj/project.pbxproj +++ b/packages/firebase_core/firebase_core/example/macos/Runner.xcodeproj/project.pbxproj @@ -401,7 +401,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -485,7 +485,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -532,7 +532,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/packages/firebase_core/firebase_core_platform_interface/lib/src/firebase_exception.dart b/packages/firebase_core/firebase_core_platform_interface/lib/src/firebase_exception.dart index 321650a70804..cd0262ec2c4b 100644 --- a/packages/firebase_core/firebase_core_platform_interface/lib/src/firebase_exception.dart +++ b/packages/firebase_core/firebase_core_platform_interface/lib/src/firebase_exception.dart @@ -70,7 +70,7 @@ class FirebaseException implements Exception { String output = '[$plugin/$code] $message'; if (stackTrace != null) { - output += '\n\n${stackTrace.toString()}'; + output += '\n\n$stackTrace'; } return output; diff --git a/packages/firebase_crashlytics/firebase_crashlytics/example/macos/Runner.xcodeproj/project.pbxproj b/packages/firebase_crashlytics/firebase_crashlytics/example/macos/Runner.xcodeproj/project.pbxproj index f7226d567bda..adba5cf2c3f7 100644 --- a/packages/firebase_crashlytics/firebase_crashlytics/example/macos/Runner.xcodeproj/project.pbxproj +++ b/packages/firebase_crashlytics/firebase_crashlytics/example/macos/Runner.xcodeproj/project.pbxproj @@ -445,7 +445,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -531,7 +531,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -578,7 +578,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/packages/firebase_database/firebase_database/example/lib/main.dart b/packages/firebase_database/firebase_database/example/lib/main.dart index 23846fa9c688..f8a545728487 100755 --- a/packages/firebase_database/firebase_database/example/lib/main.dart +++ b/packages/firebase_database/firebase_database/example/lib/main.dart @@ -222,7 +222,7 @@ class _MyHomePageState extends State { onPressed: () => _deleteMessage(snapshot), icon: const Icon(Icons.delete), ), - title: Text('$index: ${snapshot.value.toString()}'), + title: Text('$index: ${snapshot.value}'), ), ); }, diff --git a/packages/firebase_database/firebase_database/example/macos/Runner.xcodeproj/project.pbxproj b/packages/firebase_database/firebase_database/example/macos/Runner.xcodeproj/project.pbxproj index e6abe3bd79af..2dea6d1d071e 100644 --- a/packages/firebase_database/firebase_database/example/macos/Runner.xcodeproj/project.pbxproj +++ b/packages/firebase_database/firebase_database/example/macos/Runner.xcodeproj/project.pbxproj @@ -409,7 +409,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -493,7 +493,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -540,7 +540,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/packages/firebase_messaging/firebase_messaging/example/macos/Runner.xcodeproj/project.pbxproj b/packages/firebase_messaging/firebase_messaging/example/macos/Runner.xcodeproj/project.pbxproj index 4d811b6d5cba..98114e53d349 100644 --- a/packages/firebase_messaging/firebase_messaging/example/macos/Runner.xcodeproj/project.pbxproj +++ b/packages/firebase_messaging/firebase_messaging/example/macos/Runner.xcodeproj/project.pbxproj @@ -407,7 +407,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -494,7 +494,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -541,7 +541,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/packages/firebase_ml_model_downloader/firebase_ml_model_downloader/example/macos/Runner.xcodeproj/project.pbxproj b/packages/firebase_ml_model_downloader/firebase_ml_model_downloader/example/macos/Runner.xcodeproj/project.pbxproj index 79778bf43b2c..4651e6092867 100644 --- a/packages/firebase_ml_model_downloader/firebase_ml_model_downloader/example/macos/Runner.xcodeproj/project.pbxproj +++ b/packages/firebase_ml_model_downloader/firebase_ml_model_downloader/example/macos/Runner.xcodeproj/project.pbxproj @@ -407,7 +407,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -488,7 +488,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -535,7 +535,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/packages/firebase_remote_config/firebase_remote_config/example/macos/Runner.xcodeproj/project.pbxproj b/packages/firebase_remote_config/firebase_remote_config/example/macos/Runner.xcodeproj/project.pbxproj index ab8cf55a70e1..1b3ae905e110 100644 --- a/packages/firebase_remote_config/firebase_remote_config/example/macos/Runner.xcodeproj/project.pbxproj +++ b/packages/firebase_remote_config/firebase_remote_config/example/macos/Runner.xcodeproj/project.pbxproj @@ -417,7 +417,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -501,7 +501,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -548,7 +548,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/packages/firebase_storage/firebase_storage/example/analysis_options.yaml b/packages/firebase_storage/firebase_storage/example/analysis_options.yaml index bd42060db25c..8a7be1213fdb 100644 --- a/packages/firebase_storage/firebase_storage/example/analysis_options.yaml +++ b/packages/firebase_storage/firebase_storage/example/analysis_options.yaml @@ -4,4 +4,3 @@ linter: rules: avoid_print: false public_member_api_docs: false - import_of_legacy_library_into_null_safe: false diff --git a/packages/firebase_storage/firebase_storage/example/macos/Runner.xcodeproj/project.pbxproj b/packages/firebase_storage/firebase_storage/example/macos/Runner.xcodeproj/project.pbxproj index bdcbd9c16099..1db792dd6734 100644 --- a/packages/firebase_storage/firebase_storage/example/macos/Runner.xcodeproj/project.pbxproj +++ b/packages/firebase_storage/firebase_storage/example/macos/Runner.xcodeproj/project.pbxproj @@ -417,7 +417,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -501,7 +501,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -548,7 +548,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/packages/firebase_ui_auth/analysis_options.yaml b/packages/firebase_ui_auth/analysis_options.yaml index a5744c1cfbe7..ee90854937a9 100644 --- a/packages/firebase_ui_auth/analysis_options.yaml +++ b/packages/firebase_ui_auth/analysis_options.yaml @@ -1,4 +1,6 @@ include: package:flutter_lints/flutter.yaml -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options + +linter: + rules: + use_build_context_synchronously: false diff --git a/packages/firebase_ui_auth/example/macos/Runner.xcodeproj/project.pbxproj b/packages/firebase_ui_auth/example/macos/Runner.xcodeproj/project.pbxproj index 2510f0494b30..8738cc8c006d 100644 --- a/packages/firebase_ui_auth/example/macos/Runner.xcodeproj/project.pbxproj +++ b/packages/firebase_ui_auth/example/macos/Runner.xcodeproj/project.pbxproj @@ -403,7 +403,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -484,7 +484,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -531,7 +531,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/packages/firebase_ui_auth/lib/firebase_ui_auth.dart b/packages/firebase_ui_auth/lib/firebase_ui_auth.dart index dcc6e427348a..8696520b15be 100644 --- a/packages/firebase_ui_auth/lib/firebase_ui_auth.dart +++ b/packages/firebase_ui_auth/lib/firebase_ui_auth.dart @@ -2,11 +2,18 @@ // 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: use_build_context_synchronously +import 'package:firebase_auth/firebase_auth.dart' hide OAuthProvider; +import 'package:firebase_core/firebase_core.dart'; +import 'package:firebase_ui_oauth/firebase_ui_oauth.dart'; +import 'package:flutter/widgets.dart'; -export 'src/loading_indicator.dart'; -export 'src/widgets/auth_flow_builder.dart'; +import 'src/actions.dart'; +import 'src/oauth_providers.dart'; +import 'src/providers/auth_provider.dart'; + +export 'src/actions.dart'; export 'src/auth_controller.dart' show AuthAction, AuthController; +export 'src/auth_flow.dart'; export 'src/auth_state.dart' show Uninitialized, @@ -22,93 +29,71 @@ export 'src/auth_state.dart' AuthFailed, DifferentSignInMethodsFound, MFARequired; +export 'src/email_verification.dart'; +export 'src/flows/email_flow.dart'; +export 'src/flows/email_link_flow.dart'; +export 'src/flows/oauth_flow.dart' show OAuthController, OAuthFlow; +export 'src/flows/phone_auth_flow.dart'; +export 'src/flows/universal_email_sign_in_flow.dart'; +// ignore_for_file: use_build_context_synchronously +export 'src/loading_indicator.dart'; +export 'src/mfa.dart' show startMFAVerification; +export 'src/navigation/authentication.dart'; +export 'src/navigation/forgot_password.dart'; +export 'src/navigation/phone_verification.dart'; +export 'src/oauth/provider_resolvers.dart' show providerIcon; +export 'src/oauth/social_icons.dart' show SocialIcons; +export 'src/oauth_providers.dart' show OAuthHelpers; export 'src/providers/auth_provider.dart'; export 'src/providers/email_auth_provider.dart'; export 'src/providers/email_link_auth_provider.dart'; export 'src/providers/phone_auth_provider.dart'; export 'src/providers/universal_email_sign_in_provider.dart'; - -export 'src/flows/phone_auth_flow.dart'; -export 'src/flows/email_link_flow.dart'; -export 'src/flows/universal_email_sign_in_flow.dart'; - -export 'src/widgets/phone_input.dart' show PhoneInputState, PhoneInput; - -export 'src/widgets/sms_code_input.dart' show SMSCodeInputState, SMSCodeInput; - -export 'src/auth_flow.dart'; -export 'src/flows/email_flow.dart'; -export 'src/flows/oauth_flow.dart' show OAuthController, OAuthFlow; - -export 'src/oauth/social_icons.dart' show SocialIcons; -export 'src/oauth/provider_resolvers.dart' show providerIcon; -export 'src/oauth_providers.dart' show OAuthHelpers; - +export 'src/screens/email_link_sign_in_screen.dart'; +export 'src/screens/email_verification_screen.dart'; +export 'src/screens/forgot_password_screen.dart'; +export 'src/screens/internal/responsive_page.dart' + show HeaderBuilder, SideBuilder; +export 'src/screens/phone_input_screen.dart'; +export 'src/screens/profile_screen.dart' show ProfileScreen; +export 'src/screens/register_screen.dart'; +export 'src/screens/sign_in_screen.dart'; +export 'src/screens/sms_code_input_screen.dart'; +export 'src/screens/universal_email_sign_in_screen.dart'; +export 'src/styling/style.dart' show FirebaseUIStyle; +export 'src/styling/theme.dart' show FirebaseUITheme; +export 'src/views/different_method_sign_in_view.dart'; +export 'src/views/email_link_sign_in_view.dart'; +export 'src/views/find_providers_for_email_view.dart'; +export 'src/views/forgot_password_view.dart'; +export 'src/views/login_view.dart'; +export 'src/views/phone_input_view.dart'; +export 'src/views/reauthenticate_view.dart'; +export 'src/views/sms_code_input_view.dart'; export 'src/widgets/auth_flow_builder.dart'; +export 'src/widgets/delete_account_button.dart'; +export 'src/widgets/different_method_sign_in_dialog.dart'; +export 'src/widgets/editable_user_display_name.dart'; export 'src/widgets/email_form.dart' show EmailForm, ForgotPasswordAction, EmailFormStyle; +export 'src/widgets/email_input.dart'; +export 'src/widgets/email_link_sign_in_button.dart'; +export 'src/widgets/email_sign_up_dialog.dart'; export 'src/widgets/error_text.dart' show ErrorText; -export 'src/widgets/phone_verification_button.dart' - show PhoneVerificationButton; - +export 'src/widgets/forgot_password_button.dart'; export 'src/widgets/internal/oauth_provider_button.dart' show OAuthProviderButton, OAuthButtonVariant; - -export 'src/widgets/sign_out_button.dart'; -export 'src/widgets/user_avatar.dart'; -export 'src/widgets/editable_user_display_name.dart'; -export 'src/widgets/delete_account_button.dart'; -export 'src/widgets/email_input.dart'; +export 'src/widgets/internal/universal_button.dart' show ButtonVariant; +export 'src/widgets/layout_flow_aware_padding.dart'; export 'src/widgets/password_input.dart'; -export 'src/widgets/forgot_password_button.dart'; +export 'src/widgets/phone_input.dart' show PhoneInputState, PhoneInput; +export 'src/widgets/phone_verification_button.dart' + show PhoneVerificationButton; export 'src/widgets/reauthenticate_dialog.dart'; -export 'src/widgets/different_method_sign_in_dialog.dart'; -export 'src/widgets/email_sign_up_dialog.dart'; -export 'src/widgets/email_link_sign_in_button.dart'; -export 'src/widgets/layout_flow_aware_padding.dart'; - -export 'src/views/login_view.dart'; -export 'src/views/phone_input_view.dart'; -export 'src/views/sms_code_input_view.dart'; -export 'src/views/reauthenticate_view.dart'; -export 'src/views/forgot_password_view.dart'; -export 'src/views/different_method_sign_in_view.dart'; -export 'src/views/find_providers_for_email_view.dart'; -export 'src/views/email_link_sign_in_view.dart'; - -export 'src/screens/internal/responsive_page.dart' - show HeaderBuilder, SideBuilder; -export 'src/screens/phone_input_screen.dart'; -export 'src/screens/sms_code_input_screen.dart'; -export 'src/screens/sign_in_screen.dart'; -export 'src/screens/register_screen.dart'; -export 'src/screens/profile_screen.dart' show ProfileScreen; -export 'src/screens/forgot_password_screen.dart'; -export 'src/screens/universal_email_sign_in_screen.dart'; -export 'src/screens/email_link_sign_in_screen.dart'; -export 'src/screens/email_verification_screen.dart'; - -export 'src/navigation/phone_verification.dart'; -export 'src/navigation/forgot_password.dart'; -export 'src/navigation/authentication.dart'; -export 'src/actions.dart'; -export 'src/email_verification.dart'; - -export 'src/styling/theme.dart' show FirebaseUITheme; -export 'src/styling/style.dart' show FirebaseUIStyle; -export 'src/widgets/internal/universal_button.dart' show ButtonVariant; - -export 'src/mfa.dart' show startMFAVerification; - -import 'package:firebase_auth/firebase_auth.dart' hide OAuthProvider; -import 'package:firebase_core/firebase_core.dart'; -import 'package:flutter/widgets.dart'; -import 'package:firebase_ui_oauth/firebase_ui_oauth.dart'; - -import 'src/actions.dart'; -import 'src/oauth_providers.dart'; -import 'src/providers/auth_provider.dart'; +export 'src/widgets/sign_out_button.dart'; +export 'src/widgets/sms_code_input.dart' show SMSCodeInputState, SMSCodeInput; +export 'src/widgets/user_avatar.dart'; class FirebaseUIAuth { static final _providers = >{}; diff --git a/packages/firebase_ui_auth/lib/src/views/login_view.dart b/packages/firebase_ui_auth/lib/src/views/login_view.dart index c2bb00cd6e0c..003c80c7eb33 100644 --- a/packages/firebase_ui_auth/lib/src/views/login_view.dart +++ b/packages/firebase_ui_auth/lib/src/views/login_view.dart @@ -2,16 +2,14 @@ // 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. -import 'package:flutter/cupertino.dart' hide Title; -import 'package:flutter/gestures.dart'; -import 'package:flutter/material.dart' hide Title; - import 'package:firebase_auth/firebase_auth.dart' show FirebaseAuth; - import 'package:firebase_ui_auth/firebase_ui_auth.dart'; import 'package:firebase_ui_localizations/firebase_ui_localizations.dart'; import 'package:firebase_ui_oauth/firebase_ui_oauth.dart' hide OAuthProviderButtonBase; +import 'package:flutter/cupertino.dart' hide Title; +import 'package:flutter/gestures.dart'; +import 'package:flutter/material.dart' hide Title; import '../widgets/internal/title.dart'; @@ -157,7 +155,7 @@ class _LoginViewState extends State { hintStyle = theme.textTheme.textStyle.copyWith(fontSize: 12); } else { final theme = Theme.of(context); - hintStyle = Theme.of(context).textTheme.caption; + hintStyle = Theme.of(context).textTheme.bodySmall; registerTextColor = theme.colorScheme.primary; } @@ -179,7 +177,7 @@ class _LoginViewState extends State { ), TextSpan( text: actionText, - style: Theme.of(context).textTheme.button?.copyWith( + style: Theme.of(context).textTheme.labelLarge?.copyWith( color: registerTextColor, ), mouseCursor: SystemMouseCursors.click, diff --git a/packages/firebase_ui_auth/lib/src/widgets/delete_account_button.dart b/packages/firebase_ui_auth/lib/src/widgets/delete_account_button.dart index 26d7e3ab7d2f..36e7f9670e46 100644 --- a/packages/firebase_ui_auth/lib/src/widgets/delete_account_button.dart +++ b/packages/firebase_ui_auth/lib/src/widgets/delete_account_button.dart @@ -2,12 +2,13 @@ // 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. -import 'package:flutter/material.dart'; import 'package:firebase_auth/firebase_auth.dart' show FirebaseAuth, FirebaseAuthException; -import 'package:flutter/cupertino.dart'; import 'package:firebase_ui_auth/firebase_ui_auth.dart'; import 'package:firebase_ui_localizations/firebase_ui_localizations.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + import '../widgets/internal/loading_button.dart'; typedef DeleteFailedCallback = void Function(Exception exception); diff --git a/packages/firebase_ui_auth/lib/src/widgets/error_text.dart b/packages/firebase_ui_auth/lib/src/widgets/error_text.dart index 201267867a6e..e2ff0e4f9484 100644 --- a/packages/firebase_ui_auth/lib/src/widgets/error_text.dart +++ b/packages/firebase_ui_auth/lib/src/widgets/error_text.dart @@ -2,11 +2,10 @@ // 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. -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; import 'package:firebase_auth/firebase_auth.dart' show FirebaseAuthException; - import 'package:firebase_ui_localizations/firebase_ui_localizations.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; import '../flows/phone_auth_flow.dart'; @@ -57,7 +56,7 @@ class ErrorText extends StatelessWidget { if (isCupertino) { color = CupertinoColors.destructiveRed; } else { - color = Theme.of(context).errorColor; + color = Theme.of(context).colorScheme.error; } final l = FirebaseUILocalizations.labelsOf(context); diff --git a/packages/firebase_ui_auth/lib/src/widgets/internal/loading_button.dart b/packages/firebase_ui_auth/lib/src/widgets/internal/loading_button.dart index 6448b2c15014..969a0b4e8d25 100644 --- a/packages/firebase_ui_auth/lib/src/widgets/internal/loading_button.dart +++ b/packages/firebase_ui_auth/lib/src/widgets/internal/loading_button.dart @@ -2,9 +2,9 @@ // 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. +import 'package:firebase_ui_auth/firebase_ui_auth.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:firebase_ui_auth/firebase_ui_auth.dart'; import 'universal_button.dart'; @@ -25,7 +25,7 @@ class _LoadingButtonContent extends StatelessWidget { Widget child; if (color != null) { - final theme = Theme.of(context).textTheme.button; + final theme = Theme.of(context).textTheme.labelLarge; child = Text( label, style: theme?.copyWith(color: color), diff --git a/packages/firebase_ui_auth/lib/src/widgets/internal/subtitle.dart b/packages/firebase_ui_auth/lib/src/widgets/internal/subtitle.dart index 409e18bcb838..4c78ff0a8528 100644 --- a/packages/firebase_ui_auth/lib/src/widgets/internal/subtitle.dart +++ b/packages/firebase_ui_auth/lib/src/widgets/internal/subtitle.dart @@ -4,6 +4,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; + import 'platform_widget.dart'; class Subtitle extends PlatformWidget { @@ -30,7 +31,7 @@ class Subtitle extends PlatformWidget { text, style: Theme.of(context) .textTheme - .subtitle1! + .titleMedium! .copyWith(fontWeight: fontWeight), ); } diff --git a/packages/firebase_ui_auth/lib/src/widgets/internal/title.dart b/packages/firebase_ui_auth/lib/src/widgets/internal/title.dart index f324586e38be..9acdc196415b 100644 --- a/packages/firebase_ui_auth/lib/src/widgets/internal/title.dart +++ b/packages/firebase_ui_auth/lib/src/widgets/internal/title.dart @@ -23,7 +23,7 @@ class Title extends PlatformWidget { Widget buildMaterial(BuildContext context) { return Text( text, - style: Theme.of(context).textTheme.headline5, + style: Theme.of(context).textTheme.headlineSmall, ); } } diff --git a/packages/firebase_ui_auth/lib/src/widgets/sms_code_input.dart b/packages/firebase_ui_auth/lib/src/widgets/sms_code_input.dart index 937e095560d5..117690f3c32c 100644 --- a/packages/firebase_ui_auth/lib/src/widgets/sms_code_input.dart +++ b/packages/firebase_ui_auth/lib/src/widgets/sms_code_input.dart @@ -2,11 +2,12 @@ // 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. -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; import 'package:firebase_auth/firebase_auth.dart' show PhoneAuthCredential; import 'package:firebase_ui_auth/firebase_ui_auth.dart'; import 'package:firebase_ui_localizations/firebase_ui_localizations.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + import '../widgets/internal/universal_text_form_field.dart'; class _NumberDecorationPainter extends BoxPainter { @@ -90,7 +91,7 @@ class _NumberSlotState extends State<_NumberSlot> Widget build(BuildContext context) { final inputBorder = Theme.of(context).inputDecorationTheme.border; final primaryColor = Theme.of(context).colorScheme.primary; - final errorColor = Theme.of(context).errorColor; + final errorColor = Theme.of(context).colorScheme.error; final color = hasError ? errorColor : primaryColor; diff --git a/packages/firebase_ui_database/example/macos/Runner.xcodeproj/project.pbxproj b/packages/firebase_ui_database/example/macos/Runner.xcodeproj/project.pbxproj index 8bf1187cdf77..a3d6c204dd52 100644 --- a/packages/firebase_ui_database/example/macos/Runner.xcodeproj/project.pbxproj +++ b/packages/firebase_ui_database/example/macos/Runner.xcodeproj/project.pbxproj @@ -406,7 +406,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -485,7 +485,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -532,7 +532,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/packages/firebase_ui_database/lib/src/table_builder.dart b/packages/firebase_ui_database/lib/src/table_builder.dart index 8f13adfc006c..b8861bbf23c0 100644 --- a/packages/firebase_ui_database/lib/src/table_builder.dart +++ b/packages/firebase_ui_database/lib/src/table_builder.dart @@ -694,7 +694,7 @@ class _ValueView extends StatelessWidget { Widget build(BuildContext context) { final value = this.value; if (value == null) { - return Text('null', style: Theme.of(context).textTheme.caption); + return Text('null', style: Theme.of(context).textTheme.bodySmall); } else { return Text(value.toString()); } diff --git a/packages/firebase_ui_firestore/example/lib/main.dart b/packages/firebase_ui_firestore/example/lib/main.dart index be36cc646e50..773da1916a49 100644 --- a/packages/firebase_ui_firestore/example/lib/main.dart +++ b/packages/firebase_ui_firestore/example/lib/main.dart @@ -72,11 +72,11 @@ class UserTile extends StatelessWidget { children: [ Text( '${user.firstName} ${user.lastName}', - style: Theme.of(context).textTheme.subtitle1, + style: Theme.of(context).textTheme.titleMedium, ), Text( user.number, - style: Theme.of(context).textTheme.caption, + style: Theme.of(context).textTheme.bodySmall, ), ], ), diff --git a/packages/firebase_ui_firestore/example/macos/Runner.xcodeproj/project.pbxproj b/packages/firebase_ui_firestore/example/macos/Runner.xcodeproj/project.pbxproj index ef3f4e4149ce..9f10ac7eb9ae 100644 --- a/packages/firebase_ui_firestore/example/macos/Runner.xcodeproj/project.pbxproj +++ b/packages/firebase_ui_firestore/example/macos/Runner.xcodeproj/project.pbxproj @@ -406,7 +406,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -485,7 +485,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -532,7 +532,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/packages/firebase_ui_firestore/lib/src/table_builder.dart b/packages/firebase_ui_firestore/lib/src/table_builder.dart index ebdbc6df7f7b..fd9ac18d00b9 100644 --- a/packages/firebase_ui_firestore/lib/src/table_builder.dart +++ b/packages/firebase_ui_firestore/lib/src/table_builder.dart @@ -5,10 +5,10 @@ import 'dart:collection'; import 'package:cloud_firestore/cloud_firestore.dart'; +import 'package:firebase_ui_localizations/firebase_ui_localizations.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:firebase_ui_localizations/firebase_ui_localizations.dart'; import 'query_builder.dart'; @@ -974,7 +974,7 @@ class _ValueView extends StatelessWidget { Widget build(BuildContext context) { final value = this.value; if (value == null) { - return Text('null', style: Theme.of(context).textTheme.caption); + return Text('null', style: Theme.of(context).textTheme.bodySmall); } else if (value is Timestamp) { return Text(value.toDate().toString()); } else if (value is DocumentReference) { diff --git a/packages/firebase_ui_localizations/example/macos/Runner.xcodeproj/project.pbxproj b/packages/firebase_ui_localizations/example/macos/Runner.xcodeproj/project.pbxproj index 3edd264df2ed..b14296284f12 100644 --- a/packages/firebase_ui_localizations/example/macos/Runner.xcodeproj/project.pbxproj +++ b/packages/firebase_ui_localizations/example/macos/Runner.xcodeproj/project.pbxproj @@ -404,7 +404,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -483,7 +483,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -530,7 +530,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/packages/firebase_ui_oauth/example/macos/Runner.xcodeproj/project.pbxproj b/packages/firebase_ui_oauth/example/macos/Runner.xcodeproj/project.pbxproj index 1c6535df9a78..c6bcf0879335 100644 --- a/packages/firebase_ui_oauth/example/macos/Runner.xcodeproj/project.pbxproj +++ b/packages/firebase_ui_oauth/example/macos/Runner.xcodeproj/project.pbxproj @@ -410,7 +410,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -434,7 +434,7 @@ "$(inherited)", "@executable_path/../Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.14; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_VERSION = 5.0; }; @@ -492,7 +492,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -539,7 +539,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -563,7 +563,7 @@ "$(inherited)", "@executable_path/../Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.14; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; @@ -586,7 +586,7 @@ "$(inherited)", "@executable_path/../Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.14; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_VERSION = 5.0; }; diff --git a/tests/lib/main.dart b/tests/lib/main.dart index b84447b40d47..664d3dc6b6b4 100644 --- a/tests/lib/main.dart +++ b/tests/lib/main.dart @@ -3,12 +3,14 @@ // BSD-style license that can be found in the LICENSE file. import 'dart:io'; + +import 'package:firebase_app_installations/firebase_app_installations.dart'; import 'package:firebase_core/firebase_core.dart'; +import 'package:firebase_messaging/firebase_messaging.dart'; +import 'package:firebase_remote_config/firebase_remote_config.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:firebase_remote_config/firebase_remote_config.dart'; -import 'package:firebase_app_installations/firebase_app_installations.dart'; -import 'package:firebase_messaging/firebase_messaging.dart'; + import 'firebase_options.dart'; Future main() async { @@ -28,15 +30,6 @@ class MyApp extends StatelessWidget { return MaterialApp( title: 'Flutter Demo', theme: ThemeData( - // This is the theme of your application. - // - // Try running your application with "flutter run". You'll see the - // application has a blue toolbar. Then, without quitting the app, try - // changing the primarySwatch below to Colors.green and then invoke - // "hot reload" (press "r" in the console where you ran "flutter run", - // or simply save your changes to "hot reload" in a Flutter IDE). - // Notice that the counter didn't reset back to zero; the application - // is not restarted. primarySwatch: Colors.blue, ), home: const MyHomePage(title: 'Flutter Demo Home Page'), @@ -44,70 +37,19 @@ class MyApp extends StatelessWidget { } } -class MyHomePage extends StatefulWidget { +class MyHomePage extends StatelessWidget { const MyHomePage({Key? key, required this.title}) : super(key: key); - // This widget is the home page of your application. It is stateful, meaning - // that it has a State object (defined below) that contains fields that affect - // how it looks. - - // This class is the configuration for the state. It holds the values (in this - // case the title) provided by the parent (in this case the App widget) and - // used by the build method of the State. Fields in a Widget subclass are - // always marked "final". - final String title; - @override - State createState() => _MyHomePageState(); -} - -class _MyHomePageState extends State { - int _counter = 0; - - void _incrementCounter() { - setState(() { - // This call to setState tells the Flutter framework that something has - // changed in this State, which causes it to rerun the build method below - // so that the display can reflect the updated values. If we changed - // _counter without calling setState(), then the build method would not be - // called again, and so nothing would appear to happen. - _counter++; - }); - } - @override Widget build(BuildContext context) { - // This method is rerun every time setState is called, for instance as done - // by the _incrementCounter method above. - // - // The Flutter framework has been optimized to make rerunning build methods - // fast, so that you can just rebuild anything that needs updating rather - // than having to individually change instances of widgets. return Scaffold( appBar: AppBar( - // Here we take the value from the MyHomePage object that was created by - // the App.build method, and use it to set our appbar title. - title: Text(widget.title), + title: Text(title), ), body: Center( - // Center is a layout widget. It takes a single child and positions it - // in the middle of the parent. child: Column( - // Column is also a layout widget. It takes a list of children and - // arranges them vertically. By default, it sizes itself to fit its - // children horizontally, and tries to be as tall as its parent. - // - // Invoke "debug painting" (press "p" in the console, choose the - // "Toggle Debug Paint" action from the Flutter Inspector in Android - // Studio, or the "Toggle Debug Paint" command in Visual Studio Code) - // to see the wireframe for each widget. - // - // Column has various properties to control how it sizes itself and - // how it positions its children. Here we use mainAxisAlignment to - // center the children vertically; the main axis here is the vertical - // axis because Columns are vertical (the cross axis would be - // horizontal). mainAxisAlignment: MainAxisAlignment.center, children: [ ElevatedButton( @@ -142,21 +84,9 @@ class _MyHomePageState extends State { }, child: const Text('Test macOS tests manually'), ), - const Text( - 'You have pushed the button this many times:', - ), - Text( - '$_counter', - style: Theme.of(context).textTheme.headline4, - ), ], ), ), - floatingActionButton: FloatingActionButton( - onPressed: _incrementCounter, - tooltip: 'Increment', - child: const Icon(Icons.add), - ), // This trailing comma makes auto-formatting nicer for build methods. ); } } diff --git a/tests/macos/Runner.xcodeproj/project.pbxproj b/tests/macos/Runner.xcodeproj/project.pbxproj index b7908a6804dd..b94bb3235826 100644 --- a/tests/macos/Runner.xcodeproj/project.pbxproj +++ b/tests/macos/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 51; + objectVersion = 54; objects = { /* Begin PBXAggregateTarget section */ @@ -184,7 +184,6 @@ 33CC110E2044A8840003C045 /* Bundle Framework */, 3399D490228B24CF009A79C7 /* ShellScript */, B6FDA406E9A0EB363B9CC88C /* [CP] Embed Pods Frameworks */, - 741DA0581CD7F52CFA7F2590 /* [CP] Copy Pods Resources */, 76D37D3A2A5275D5E0B8B1B9 /* [firebase_crashlytics] Crashlytics Upload Symbols */, ); buildRules = ( @@ -279,6 +278,7 @@ }; 3399D490228B24CF009A79C7 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -314,23 +314,6 @@ shellPath = /bin/sh; shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; }; - 741DA0581CD7F52CFA7F2590 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; 76D37D3A2A5275D5E0B8B1B9 /* [firebase_crashlytics] Crashlytics Upload Symbols */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647;