diff --git a/analysis_options.yaml b/analysis_options.yaml new file mode 100644 index 000000000..8e23d8be3 --- /dev/null +++ b/analysis_options.yaml @@ -0,0 +1,6 @@ +include: package:flutter_lints/flutter.yaml + +linter: + rules: + # Ignoring to handle diffenent SDKs on dev machine + #- unnecessary_ignore diff --git a/packages/firebase_ui_auth/analysis_options.yaml b/packages/firebase_ui_auth/analysis_options.yaml deleted file mode 100644 index ee9085493..000000000 --- a/packages/firebase_ui_auth/analysis_options.yaml +++ /dev/null @@ -1,6 +0,0 @@ -include: package:flutter_lints/flutter.yaml - - -linter: - rules: - use_build_context_synchronously: false diff --git a/packages/firebase_ui_auth/example/analysis_options.yaml b/packages/firebase_ui_auth/example/analysis_options.yaml deleted file mode 100644 index fd16f9219..000000000 --- a/packages/firebase_ui_auth/example/analysis_options.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# This file configures the analyzer, which statically analyzes Dart code to -# check for errors, warnings, and lints. -# -# The issues identified by the analyzer are surfaced in the UI of Dart-enabled -# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be -# invoked from the command line by running `flutter analyze`. - -# The following line activates a set of recommended lints for Flutter apps, -# packages, and plugins designed to encourage good coding practices. -include: package:flutter_lints/flutter.yaml - -linter: - # The lint rules applied to this project can be customized in the - # section below to disable rules from the `package:flutter_lints/flutter.yaml` - # included above or to enable additional rules. A list of all available lints - # and their documentation is published at - # https://dart-lang.github.io/linter/lints/index.html. - # - # Instead of disabling a lint rule for the entire project in the - # section below, it can also be suppressed for a single line of code - # or a specific dart file by using the `// ignore: name_of_lint` and - # `// ignore_for_file: name_of_lint` syntax on the line or in the file - # producing the lint. - rules: - # avoid_print: false # Uncomment to disable the `avoid_print` rule - # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options diff --git a/packages/firebase_ui_auth/example/lib/config.dart b/packages/firebase_ui_auth/example/lib/config.dart index 4e9ad9b6c..37ed22217 100644 --- a/packages/firebase_ui_auth/example/lib/config.dart +++ b/packages/firebase_ui_auth/example/lib/config.dart @@ -2,7 +2,7 @@ // 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: do_not_use_environment, constant_identifier_names, non_constant_identifier_names +// ignore_for_file: constant_identifier_names, non_constant_identifier_names import 'package:flutter/foundation.dart'; diff --git a/packages/firebase_ui_auth/example/lib/firebase_options.dart b/packages/firebase_ui_auth/example/lib/firebase_options.dart index 28f5e1663..87f3cce3d 100644 --- a/packages/firebase_ui_auth/example/lib/firebase_options.dart +++ b/packages/firebase_ui_auth/example/lib/firebase_options.dart @@ -3,7 +3,6 @@ // BSD-style license that can be found in the LICENSE file. // File generated by FlutterFire CLI. -// ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members import 'package:firebase_core/firebase_core.dart' show FirebaseOptions; import 'package:flutter/foundation.dart' show defaultTargetPlatform, kIsWeb, TargetPlatform; diff --git a/packages/firebase_ui_auth/example/pubspec.yaml b/packages/firebase_ui_auth/example/pubspec.yaml index d79075e00..5de246ef1 100644 --- a/packages/firebase_ui_auth/example/pubspec.yaml +++ b/packages/firebase_ui_auth/example/pubspec.yaml @@ -48,7 +48,7 @@ dev_dependencies: sdk: flutter flutter_test: sdk: flutter - flutter_lints: ^3.0.1 + flutter_lints: ^6.0.0 google_sign_in: ^6.2.1 http: ^1.1.2 integration_test: diff --git a/packages/firebase_ui_auth/lib/firebase_ui_auth.dart b/packages/firebase_ui_auth/lib/firebase_ui_auth.dart index 5ee557a87..0d080a059 100644 --- a/packages/firebase_ui_auth/lib/firebase_ui_auth.dart +++ b/packages/firebase_ui_auth/lib/firebase_ui_auth.dart @@ -142,7 +142,7 @@ class FirebaseUIAuth { await OAuthProviders.signOut(resolvedAuth); await resolvedAuth.signOut(); - if (context != null) { + if (context != null && context.mounted) { final action = FirebaseUIAction.ofType(context); action?.callback(context); } diff --git a/packages/firebase_ui_auth/lib/src/providers/email_link_auth_provider.dart b/packages/firebase_ui_auth/lib/src/providers/email_link_auth_provider.dart index 092cfa256..b0607adc3 100644 --- a/packages/firebase_ui_auth/lib/src/providers/email_link_auth_provider.dart +++ b/packages/firebase_ui_auth/lib/src/providers/email_link_auth_provider.dart @@ -1,7 +1,6 @@ // Copyright 2022, 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: deprecated_member_use import 'package:firebase_auth/firebase_auth.dart' as fba; import 'package:flutter/foundation.dart'; diff --git a/packages/firebase_ui_auth/lib/src/screens/email_verification_screen.dart b/packages/firebase_ui_auth/lib/src/screens/email_verification_screen.dart index 029342040..3a571588c 100644 --- a/packages/firebase_ui_auth/lib/src/screens/email_verification_screen.dart +++ b/packages/firebase_ui_auth/lib/src/screens/email_verification_screen.dart @@ -145,7 +145,7 @@ class __EmailVerificationScreenContentState super.initState(); } - void _sendEmailVerification(_) { + void _sendEmailVerification(void _) { controller ..addListener(() { setState(() {}); diff --git a/packages/firebase_ui_auth/lib/src/screens/profile_screen.dart b/packages/firebase_ui_auth/lib/src/screens/profile_screen.dart index 993281c91..1c414dbe1 100644 --- a/packages/firebase_ui_auth/lib/src/screens/profile_screen.dart +++ b/packages/firebase_ui_auth/lib/src/screens/profile_screen.dart @@ -422,7 +422,6 @@ class _EmailVerificationBadgeState extends State<_EmailVerificationBadge> { ), const SizedBox(height: 16), if (state == EmailVerificationState.pending) - // ignore: prefer_const_constructors Row( mainAxisAlignment: MainAxisAlignment.center, children: [ @@ -615,6 +614,8 @@ class _MFAToggleState extends State<_MFAToggle> { final mfa = widget.auth.currentUser!.multiFactor; final session = await mfa.getSession(); + if (!mounted) return; + await startPhoneVerification( context: context, action: AuthAction.none, @@ -637,7 +638,9 @@ class _MFAToggleState extends State<_MFAToggle> { isLoading = false; }); - Navigator.of(context).popUntil((route) => route == currentRoute); + if (context.mounted) { + Navigator.of(context).popUntil((route) => route == currentRoute); + } } }) ], diff --git a/packages/firebase_ui_auth/lib/src/widgets/auth_flow_builder.dart b/packages/firebase_ui_auth/lib/src/widgets/auth_flow_builder.dart index c8a3b5690..042a8dd79 100644 --- a/packages/firebase_ui_auth/lib/src/widgets/auth_flow_builder.dart +++ b/packages/firebase_ui_auth/lib/src/widgets/auth_flow_builder.dart @@ -192,7 +192,7 @@ class _AuthFlowBuilderState late AuthProvider provider = widget.provider ?? _createDefaultProvider(); - Widget _defaultBuilder(_, __, ___, ____) { + Widget _defaultBuilder(BuildContext _, AuthState __, T ___, Widget? ____) { return widget.child!; } 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 cb2235b21..9634404bb 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 @@ -126,6 +126,8 @@ class _DeleteAccountButtonState extends State { final user = auth.currentUser!; await auth.currentUser?.delete(); + if (!mounted) return; + FirebaseUIAction.ofType( context, )?.callback(context, user); diff --git a/packages/firebase_ui_auth/lib/src/widgets/editable_user_display_name.dart b/packages/firebase_ui_auth/lib/src/widgets/editable_user_display_name.dart index e5c28b5c7..ef161d94d 100644 --- a/packages/firebase_ui_auth/lib/src/widgets/editable_user_display_name.dart +++ b/packages/firebase_ui_auth/lib/src/widgets/editable_user_display_name.dart @@ -74,6 +74,8 @@ class _EditableUserDisplayNameState extends State { await auth.currentUser?.updateDisplayName(ctrl.text); await auth.currentUser?.reload(); + if (!mounted) return; + FirebaseUIAction.ofType(context)?.callback( context, previousDisplayName, diff --git a/packages/firebase_ui_auth/lib/src/widgets/phone_input.dart b/packages/firebase_ui_auth/lib/src/widgets/phone_input.dart index 3f5ff11b3..1a0aef9d3 100644 --- a/packages/firebase_ui_auth/lib/src/widgets/phone_input.dart +++ b/packages/firebase_ui_auth/lib/src/widgets/phone_input.dart @@ -38,7 +38,6 @@ class _CountryPicker extends StatefulWidget { const _CountryPicker(); @override - // ignore: library_private_types_in_public_api _CountryPickerState createState() => _CountryPickerState(); } @@ -142,7 +141,7 @@ class PhoneInputState extends State { // ignore: library_private_types_in_public_api _CountryCodeItem? countryCodeItem; - void _onSubmitted(_) { + void _onSubmitted(void _) { if (formKey.currentState!.validate()) { widget.onSubmit?.call(phoneNumber); } diff --git a/packages/firebase_ui_auth/pubspec.yaml b/packages/firebase_ui_auth/pubspec.yaml index 7bd0985ec..8dcfbba49 100644 --- a/packages/firebase_ui_auth/pubspec.yaml +++ b/packages/firebase_ui_auth/pubspec.yaml @@ -26,7 +26,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^3.0.1 + flutter_lints: ^6.0.0 mockito: ^5.4.4 false_secrets: diff --git a/packages/firebase_ui_database/analysis_options.yaml b/packages/firebase_ui_database/analysis_options.yaml deleted file mode 100644 index a5744c1cf..000000000 --- a/packages/firebase_ui_database/analysis_options.yaml +++ /dev/null @@ -1,4 +0,0 @@ -include: package:flutter_lints/flutter.yaml - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options diff --git a/packages/firebase_ui_database/example/analysis_options.yaml b/packages/firebase_ui_database/example/analysis_options.yaml deleted file mode 100644 index 61b6c4de1..000000000 --- a/packages/firebase_ui_database/example/analysis_options.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# This file configures the analyzer, which statically analyzes Dart code to -# check for errors, warnings, and lints. -# -# The issues identified by the analyzer are surfaced in the UI of Dart-enabled -# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be -# invoked from the command line by running `flutter analyze`. - -# The following line activates a set of recommended lints for Flutter apps, -# packages, and plugins designed to encourage good coding practices. -include: package:flutter_lints/flutter.yaml - -linter: - # The lint rules applied to this project can be customized in the - # section below to disable rules from the `package:flutter_lints/flutter.yaml` - # included above or to enable additional rules. A list of all available lints - # and their documentation is published at - # https://dart-lang.github.io/linter/lints/index.html. - # - # Instead of disabling a lint rule for the entire project in the - # section below, it can also be suppressed for a single line of code - # or a specific dart file by using the `// ignore: name_of_lint` and - # `// ignore_for_file: name_of_lint` syntax on the line or in the file - # producing the lint. - rules: - # avoid_print: false # Uncomment to disable the `avoid_print` rule - # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options diff --git a/packages/firebase_ui_database/example/lib/firebase_options.dart b/packages/firebase_ui_database/example/lib/firebase_options.dart index cae6254d5..843349881 100644 --- a/packages/firebase_ui_database/example/lib/firebase_options.dart +++ b/packages/firebase_ui_database/example/lib/firebase_options.dart @@ -3,7 +3,6 @@ // BSD-style license that can be found in the LICENSE file. // File generated by FlutterFire CLI. -// ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members import 'package:firebase_core/firebase_core.dart' show FirebaseOptions; import 'package:flutter/foundation.dart' show defaultTargetPlatform, kIsWeb, TargetPlatform; diff --git a/packages/firebase_ui_database/example/pubspec.yaml b/packages/firebase_ui_database/example/pubspec.yaml index fc953a74b..9c07b2ed2 100644 --- a/packages/firebase_ui_database/example/pubspec.yaml +++ b/packages/firebase_ui_database/example/pubspec.yaml @@ -50,7 +50,7 @@ dev_dependencies: # activated in the `analysis_options.yaml` file located at the root of your # package. See that file for information about deactivating specific lint # rules and activating additional ones. - flutter_lints: ^3.0.1 + flutter_lints: ^6.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/packages/firebase_ui_database/pubspec.yaml b/packages/firebase_ui_database/pubspec.yaml index 7828bbef3..846e95eaa 100644 --- a/packages/firebase_ui_database/pubspec.yaml +++ b/packages/firebase_ui_database/pubspec.yaml @@ -18,7 +18,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^3.0.1 + flutter_lints: ^6.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/packages/firebase_ui_firestore/analysis_options.yaml b/packages/firebase_ui_firestore/analysis_options.yaml deleted file mode 100644 index a5744c1cf..000000000 --- a/packages/firebase_ui_firestore/analysis_options.yaml +++ /dev/null @@ -1,4 +0,0 @@ -include: package:flutter_lints/flutter.yaml - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options diff --git a/packages/firebase_ui_firestore/example/analysis_options.yaml b/packages/firebase_ui_firestore/example/analysis_options.yaml deleted file mode 100644 index 61b6c4de1..000000000 --- a/packages/firebase_ui_firestore/example/analysis_options.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# This file configures the analyzer, which statically analyzes Dart code to -# check for errors, warnings, and lints. -# -# The issues identified by the analyzer are surfaced in the UI of Dart-enabled -# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be -# invoked from the command line by running `flutter analyze`. - -# The following line activates a set of recommended lints for Flutter apps, -# packages, and plugins designed to encourage good coding practices. -include: package:flutter_lints/flutter.yaml - -linter: - # The lint rules applied to this project can be customized in the - # section below to disable rules from the `package:flutter_lints/flutter.yaml` - # included above or to enable additional rules. A list of all available lints - # and their documentation is published at - # https://dart-lang.github.io/linter/lints/index.html. - # - # Instead of disabling a lint rule for the entire project in the - # section below, it can also be suppressed for a single line of code - # or a specific dart file by using the `// ignore: name_of_lint` and - # `// ignore_for_file: name_of_lint` syntax on the line or in the file - # producing the lint. - rules: - # avoid_print: false # Uncomment to disable the `avoid_print` rule - # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options diff --git a/packages/firebase_ui_firestore/example/lib/firebase_options.dart b/packages/firebase_ui_firestore/example/lib/firebase_options.dart index cae6254d5..843349881 100644 --- a/packages/firebase_ui_firestore/example/lib/firebase_options.dart +++ b/packages/firebase_ui_firestore/example/lib/firebase_options.dart @@ -3,7 +3,6 @@ // BSD-style license that can be found in the LICENSE file. // File generated by FlutterFire CLI. -// ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members import 'package:firebase_core/firebase_core.dart' show FirebaseOptions; import 'package:flutter/foundation.dart' show defaultTargetPlatform, kIsWeb, TargetPlatform; diff --git a/packages/firebase_ui_firestore/example/pubspec.yaml b/packages/firebase_ui_firestore/example/pubspec.yaml index 8345443fd..6178f5705 100644 --- a/packages/firebase_ui_firestore/example/pubspec.yaml +++ b/packages/firebase_ui_firestore/example/pubspec.yaml @@ -48,7 +48,7 @@ dev_dependencies: # activated in the `analysis_options.yaml` file located at the root of your # package. See that file for information about deactivating specific lint # rules and activating additional ones. - flutter_lints: ^3.0.1 + flutter_lints: ^6.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/packages/firebase_ui_firestore/pubspec.yaml b/packages/firebase_ui_firestore/pubspec.yaml index 9399aa399..69ba6d947 100644 --- a/packages/firebase_ui_firestore/pubspec.yaml +++ b/packages/firebase_ui_firestore/pubspec.yaml @@ -18,7 +18,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^3.0.1 + flutter_lints: ^6.0.0 mockito: ^5.4.4 # For information on the generic Dart part of this file, see the diff --git a/packages/firebase_ui_firestore/test/table_builder_test.dart b/packages/firebase_ui_firestore/test/table_builder_test.dart index 3e5563cee..dbd23f843 100644 --- a/packages/firebase_ui_firestore/test/table_builder_test.dart +++ b/packages/firebase_ui_firestore/test/table_builder_test.dart @@ -2,7 +2,7 @@ // 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: subtype_of_sealed_class, must_be_immutable, avoid_implementing_value_types +// ignore_for_file: subtype_of_sealed_class, must_be_immutable import 'dart:async'; diff --git a/packages/firebase_ui_localizations/analysis_options.yaml b/packages/firebase_ui_localizations/analysis_options.yaml deleted file mode 100644 index a5744c1cf..000000000 --- a/packages/firebase_ui_localizations/analysis_options.yaml +++ /dev/null @@ -1,4 +0,0 @@ -include: package:flutter_lints/flutter.yaml - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options diff --git a/packages/firebase_ui_localizations/example/analysis_options.yaml b/packages/firebase_ui_localizations/example/analysis_options.yaml deleted file mode 100644 index f9b303465..000000000 --- a/packages/firebase_ui_localizations/example/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:flutter_lints/flutter.yaml diff --git a/packages/firebase_ui_localizations/example/lib/firebase_options.dart b/packages/firebase_ui_localizations/example/lib/firebase_options.dart index cae6254d5..843349881 100644 --- a/packages/firebase_ui_localizations/example/lib/firebase_options.dart +++ b/packages/firebase_ui_localizations/example/lib/firebase_options.dart @@ -3,7 +3,6 @@ // BSD-style license that can be found in the LICENSE file. // File generated by FlutterFire CLI. -// ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members import 'package:firebase_core/firebase_core.dart' show FirebaseOptions; import 'package:flutter/foundation.dart' show defaultTargetPlatform, kIsWeb, TargetPlatform; diff --git a/packages/firebase_ui_localizations/example/pubspec.yaml b/packages/firebase_ui_localizations/example/pubspec.yaml index 1519a630e..330dbae4f 100644 --- a/packages/firebase_ui_localizations/example/pubspec.yaml +++ b/packages/firebase_ui_localizations/example/pubspec.yaml @@ -42,7 +42,7 @@ dependencies: sdk: flutter dev_dependencies: - flutter_lints: ^3.0.1 + flutter_lints: ^6.0.0 flutter_test: sdk: flutter diff --git a/packages/firebase_ui_localizations/pubspec.yaml b/packages/firebase_ui_localizations/pubspec.yaml index 8d1de2203..98150fd8e 100644 --- a/packages/firebase_ui_localizations/pubspec.yaml +++ b/packages/firebase_ui_localizations/pubspec.yaml @@ -18,7 +18,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^3.0.1 + flutter_lints: ^6.0.0 false_secrets: - example/** diff --git a/packages/firebase_ui_oauth/analysis_options.yaml b/packages/firebase_ui_oauth/analysis_options.yaml deleted file mode 100644 index a5744c1cf..000000000 --- a/packages/firebase_ui_oauth/analysis_options.yaml +++ /dev/null @@ -1,4 +0,0 @@ -include: package:flutter_lints/flutter.yaml - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options diff --git a/packages/firebase_ui_oauth/example/analysis_options.yaml b/packages/firebase_ui_oauth/example/analysis_options.yaml deleted file mode 100644 index 61b6c4de1..000000000 --- a/packages/firebase_ui_oauth/example/analysis_options.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# This file configures the analyzer, which statically analyzes Dart code to -# check for errors, warnings, and lints. -# -# The issues identified by the analyzer are surfaced in the UI of Dart-enabled -# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be -# invoked from the command line by running `flutter analyze`. - -# The following line activates a set of recommended lints for Flutter apps, -# packages, and plugins designed to encourage good coding practices. -include: package:flutter_lints/flutter.yaml - -linter: - # The lint rules applied to this project can be customized in the - # section below to disable rules from the `package:flutter_lints/flutter.yaml` - # included above or to enable additional rules. A list of all available lints - # and their documentation is published at - # https://dart-lang.github.io/linter/lints/index.html. - # - # Instead of disabling a lint rule for the entire project in the - # section below, it can also be suppressed for a single line of code - # or a specific dart file by using the `// ignore: name_of_lint` and - # `// ignore_for_file: name_of_lint` syntax on the line or in the file - # producing the lint. - rules: - # avoid_print: false # Uncomment to disable the `avoid_print` rule - # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options diff --git a/packages/firebase_ui_oauth/example/lib/firebase_options.dart b/packages/firebase_ui_oauth/example/lib/firebase_options.dart index cae6254d5..843349881 100644 --- a/packages/firebase_ui_oauth/example/lib/firebase_options.dart +++ b/packages/firebase_ui_oauth/example/lib/firebase_options.dart @@ -3,7 +3,6 @@ // BSD-style license that can be found in the LICENSE file. // File generated by FlutterFire CLI. -// ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members import 'package:firebase_core/firebase_core.dart' show FirebaseOptions; import 'package:flutter/foundation.dart' show defaultTargetPlatform, kIsWeb, TargetPlatform; diff --git a/packages/firebase_ui_oauth/example/pubspec.yaml b/packages/firebase_ui_oauth/example/pubspec.yaml index be4e18016..7ee549d6a 100644 --- a/packages/firebase_ui_oauth/example/pubspec.yaml +++ b/packages/firebase_ui_oauth/example/pubspec.yaml @@ -51,7 +51,7 @@ dev_dependencies: # activated in the `analysis_options.yaml` file located at the root of your # package. See that file for information about deactivating specific lint # rules and activating additional ones. - flutter_lints: ^3.0.1 + flutter_lints: ^6.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/packages/firebase_ui_oauth/pubspec.yaml b/packages/firebase_ui_oauth/pubspec.yaml index 72dbcf889..89ced8811 100644 --- a/packages/firebase_ui_oauth/pubspec.yaml +++ b/packages/firebase_ui_oauth/pubspec.yaml @@ -20,7 +20,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^3.0.1 + flutter_lints: ^6.0.0 false_secrets: - "/example/**/google-services.json" diff --git a/packages/firebase_ui_oauth_apple/analysis_options.yaml b/packages/firebase_ui_oauth_apple/analysis_options.yaml deleted file mode 100644 index a5744c1cf..000000000 --- a/packages/firebase_ui_oauth_apple/analysis_options.yaml +++ /dev/null @@ -1,4 +0,0 @@ -include: package:flutter_lints/flutter.yaml - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options diff --git a/packages/firebase_ui_oauth_apple/pubspec.yaml b/packages/firebase_ui_oauth_apple/pubspec.yaml index 883000c7d..f245454e7 100644 --- a/packages/firebase_ui_oauth_apple/pubspec.yaml +++ b/packages/firebase_ui_oauth_apple/pubspec.yaml @@ -17,7 +17,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^3.0.1 + flutter_lints: ^6.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/packages/firebase_ui_oauth_facebook/analysis_options.yaml b/packages/firebase_ui_oauth_facebook/analysis_options.yaml deleted file mode 100644 index a5744c1cf..000000000 --- a/packages/firebase_ui_oauth_facebook/analysis_options.yaml +++ /dev/null @@ -1,4 +0,0 @@ -include: package:flutter_lints/flutter.yaml - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options diff --git a/packages/firebase_ui_oauth_facebook/pubspec.yaml b/packages/firebase_ui_oauth_facebook/pubspec.yaml index 32d28e487..7543c855f 100644 --- a/packages/firebase_ui_oauth_facebook/pubspec.yaml +++ b/packages/firebase_ui_oauth_facebook/pubspec.yaml @@ -20,7 +20,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^3.0.1 + flutter_lints: ^6.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/packages/firebase_ui_oauth_google/analysis_options.yaml b/packages/firebase_ui_oauth_google/analysis_options.yaml deleted file mode 100644 index a5744c1cf..000000000 --- a/packages/firebase_ui_oauth_google/analysis_options.yaml +++ /dev/null @@ -1,4 +0,0 @@ -include: package:flutter_lints/flutter.yaml - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options diff --git a/packages/firebase_ui_oauth_google/pubspec.yaml b/packages/firebase_ui_oauth_google/pubspec.yaml index ae8638756..456bbe809 100644 --- a/packages/firebase_ui_oauth_google/pubspec.yaml +++ b/packages/firebase_ui_oauth_google/pubspec.yaml @@ -18,7 +18,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^3.0.1 + flutter_lints: ^6.0.0 false_secrets: - "/example/**/google-services.json" diff --git a/packages/firebase_ui_oauth_twitter/analysis_options.yaml b/packages/firebase_ui_oauth_twitter/analysis_options.yaml deleted file mode 100644 index a5744c1cf..000000000 --- a/packages/firebase_ui_oauth_twitter/analysis_options.yaml +++ /dev/null @@ -1,4 +0,0 @@ -include: package:flutter_lints/flutter.yaml - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options diff --git a/packages/firebase_ui_oauth_twitter/pubspec.yaml b/packages/firebase_ui_oauth_twitter/pubspec.yaml index fcfe28fd6..1ebbdaf60 100644 --- a/packages/firebase_ui_oauth_twitter/pubspec.yaml +++ b/packages/firebase_ui_oauth_twitter/pubspec.yaml @@ -18,7 +18,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^3.0.1 + flutter_lints: ^6.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/packages/firebase_ui_shared/analysis_options.yaml b/packages/firebase_ui_shared/analysis_options.yaml deleted file mode 100644 index a5744c1cf..000000000 --- a/packages/firebase_ui_shared/analysis_options.yaml +++ /dev/null @@ -1,4 +0,0 @@ -include: package:flutter_lints/flutter.yaml - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options diff --git a/packages/firebase_ui_shared/pubspec.yaml b/packages/firebase_ui_shared/pubspec.yaml index 062a221e0..15fb08c50 100644 --- a/packages/firebase_ui_shared/pubspec.yaml +++ b/packages/firebase_ui_shared/pubspec.yaml @@ -15,6 +15,6 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^3.0.1 + flutter_lints: ^6.0.0 flutter: diff --git a/packages/firebase_ui_storage/analysis_options.yaml b/packages/firebase_ui_storage/analysis_options.yaml deleted file mode 100644 index a5744c1cf..000000000 --- a/packages/firebase_ui_storage/analysis_options.yaml +++ /dev/null @@ -1,4 +0,0 @@ -include: package:flutter_lints/flutter.yaml - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options diff --git a/packages/firebase_ui_storage/example/analysis_options.yaml b/packages/firebase_ui_storage/example/analysis_options.yaml deleted file mode 100644 index f9b303465..000000000 --- a/packages/firebase_ui_storage/example/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:flutter_lints/flutter.yaml diff --git a/packages/firebase_ui_storage/example/lib/firebase_options.dart b/packages/firebase_ui_storage/example/lib/firebase_options.dart index 7f49f0abc..b969a7de8 100644 --- a/packages/firebase_ui_storage/example/lib/firebase_options.dart +++ b/packages/firebase_ui_storage/example/lib/firebase_options.dart @@ -3,7 +3,6 @@ // BSD-style license that can be found in the LICENSE file. // File generated by FlutterFire CLI. -// ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members import 'package:firebase_core/firebase_core.dart' show FirebaseOptions; import 'package:flutter/foundation.dart' show defaultTargetPlatform, kIsWeb, TargetPlatform; diff --git a/packages/firebase_ui_storage/example/pubspec.yaml b/packages/firebase_ui_storage/example/pubspec.yaml index 49661026e..b71e71f75 100644 --- a/packages/firebase_ui_storage/example/pubspec.yaml +++ b/packages/firebase_ui_storage/example/pubspec.yaml @@ -22,7 +22,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^3.0.1 + flutter_lints: ^6.0.0 flutter: uses-material-design: true diff --git a/packages/firebase_ui_storage/pubspec.yaml b/packages/firebase_ui_storage/pubspec.yaml index ca6a1661d..f942b3782 100644 --- a/packages/firebase_ui_storage/pubspec.yaml +++ b/packages/firebase_ui_storage/pubspec.yaml @@ -26,7 +26,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^3.0.1 + flutter_lints: ^6.0.0 mockito: ^5.4.4 flutter: diff --git a/pubspec.yaml b/pubspec.yaml index 5c47278fd..1f74d9c12 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -25,6 +25,9 @@ workspace: dev_dependencies: melos: ^7.5.0 + path: ^1.9.1 + yaml: ^3.1.3 + yaml_edit: ^2.2.4 melos: repository: https://github.com/firebase/FirebaseUI-Flutter diff --git a/scripts/update_dependencies.dart b/scripts/update_dependencies.dart index ca74c2477..863a4f3c1 100644 --- a/scripts/update_dependencies.dart +++ b/scripts/update_dependencies.dart @@ -2,6 +2,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. +// ignore_for_file: avoid_print + import 'dart:convert'; import 'dart:io'; import 'package:path/path.dart' as p; diff --git a/tests/analysis_options.yaml b/tests/analysis_options.yaml deleted file mode 100644 index 0d2902135..000000000 --- a/tests/analysis_options.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# This file configures the analyzer, which statically analyzes Dart code to -# check for errors, warnings, and lints. -# -# The issues identified by the analyzer are surfaced in the UI of Dart-enabled -# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be -# invoked from the command line by running `flutter analyze`. - -# The following line activates a set of recommended lints for Flutter apps, -# packages, and plugins designed to encourage good coding practices. -include: package:flutter_lints/flutter.yaml - -linter: - # The lint rules applied to this project can be customized in the - # section below to disable rules from the `package:flutter_lints/flutter.yaml` - # included above or to enable additional rules. A list of all available lints - # and their documentation is published at https://dart.dev/lints. - # - # Instead of disabling a lint rule for the entire project in the - # section below, it can also be suppressed for a single line of code - # or a specific dart file by using the `// ignore: name_of_lint` and - # `// ignore_for_file: name_of_lint` syntax on the line or in the file - # producing the lint. - rules: - # avoid_print: false # Uncomment to disable the `avoid_print` rule - # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options diff --git a/tests/integration_test/firebase_ui_oauth_apple/apple_sign_in_test.dart b/tests/integration_test/firebase_ui_oauth_apple/apple_sign_in_test.dart index bd036a6a3..12e87de0f 100644 --- a/tests/integration_test/firebase_ui_oauth_apple/apple_sign_in_test.dart +++ b/tests/integration_test/firebase_ui_oauth_apple/apple_sign_in_test.dart @@ -156,7 +156,6 @@ class MockCredential extends Mock implements fba.UserCredential { class MockProvider extends Mock implements fba.AppleAuthProvider {} -// ignore: avoid_implementing_value_types class MockApp extends Mock implements FirebaseApp {} class MockAuth extends Mock implements fba.FirebaseAuth { diff --git a/tests/integration_test/firebase_ui_oauth_google/google_sign_in_test.dart b/tests/integration_test/firebase_ui_oauth_google/google_sign_in_test.dart index d42e9cf1e..bffd99260 100644 --- a/tests/integration_test/firebase_ui_oauth_google/google_sign_in_test.dart +++ b/tests/integration_test/firebase_ui_oauth_google/google_sign_in_test.dart @@ -126,7 +126,7 @@ class MockAuthentication extends Mock implements GoogleSignInAuthentication { final String accessToken = _jwt; } -// ignore: avoid_implementing_value_types, must_be_immutable +// ignore: must_be_immutable class MockGoogleSignInAccount extends Mock implements GoogleSignInAccount { @override Future get authentication async => diff --git a/tests/integration_test/utils.dart b/tests/integration_test/utils.dart index 1336d4e8a..18c5e9a5a 100644 --- a/tests/integration_test/utils.dart +++ b/tests/integration_test/utils.dart @@ -198,7 +198,6 @@ TypeMatcher> isQueryDocumentSnapshot({ }) { var matcher = isA>(); - // ignore: join_return_with_assignment matcher = matcher.applyHaving('data', (value) => value.data(), data); return matcher; diff --git a/tests/lib/firebase_options.dart b/tests/lib/firebase_options.dart index f0335ca2b..f2696556b 100644 --- a/tests/lib/firebase_options.dart +++ b/tests/lib/firebase_options.dart @@ -3,7 +3,6 @@ // BSD-style license that can be found in the LICENSE file. // File generated by FlutterFire CLI. -// ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members import 'package:firebase_core/firebase_core.dart' show FirebaseOptions; import 'package:flutter/foundation.dart' show defaultTargetPlatform, kIsWeb, TargetPlatform; diff --git a/tests/pubspec.yaml b/tests/pubspec.yaml index 2ceb83215..67842bff5 100644 --- a/tests/pubspec.yaml +++ b/tests/pubspec.yaml @@ -34,7 +34,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^3.0.1 + flutter_lints: ^6.0.0 mockito: ^5.4.4 integration_test: sdk: flutter