Skip to content

Commit 1535fac

Browse files
authored
feat: upgrade all packages min SDK to Dart 3.5 (#616)
1 parent 9b364be commit 1535fac

File tree

59 files changed

+45
-229
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+45
-229
lines changed

analysis_options.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
include: package:flutter_lints/flutter.yaml
2+
3+
linter:
4+
rules:
5+
# Ignoring to handle diffenent SDKs on dev machine
6+
#- unnecessary_ignore

packages/firebase_ui_auth/analysis_options.yaml

Lines changed: 0 additions & 6 deletions
This file was deleted.

packages/firebase_ui_auth/example/analysis_options.yaml

Lines changed: 0 additions & 28 deletions
This file was deleted.

packages/firebase_ui_auth/example/lib/config.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
// ignore_for_file: do_not_use_environment, constant_identifier_names, non_constant_identifier_names
5+
// ignore_for_file: constant_identifier_names, non_constant_identifier_names
66

77
import 'package:flutter/foundation.dart';
88

packages/firebase_ui_auth/example/lib/firebase_options.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// BSD-style license that can be found in the LICENSE file.
44

55
// File generated by FlutterFire CLI.
6-
// ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members
76
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
87
import 'package:flutter/foundation.dart'
98
show defaultTargetPlatform, kIsWeb, TargetPlatform;

packages/firebase_ui_auth/example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ dev_dependencies:
4848
sdk: flutter
4949
flutter_test:
5050
sdk: flutter
51-
flutter_lints: ^3.0.1
51+
flutter_lints: ^6.0.0
5252
google_sign_in: ^6.2.1
5353
http: ^1.1.2
5454
integration_test:

packages/firebase_ui_auth/lib/firebase_ui_auth.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ class FirebaseUIAuth {
142142
await OAuthProviders.signOut(resolvedAuth);
143143
await resolvedAuth.signOut();
144144

145-
if (context != null) {
145+
if (context != null && context.mounted) {
146146
final action = FirebaseUIAction.ofType<SignedOutAction>(context);
147147
action?.callback(context);
148148
}

packages/firebase_ui_auth/lib/src/providers/email_link_auth_provider.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright 2022, the Chromium project authors. Please see the AUTHORS file
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
4-
// ignore_for_file: deprecated_member_use
54

65
import 'package:firebase_auth/firebase_auth.dart' as fba;
76
import 'package:flutter/foundation.dart';

packages/firebase_ui_auth/lib/src/screens/email_verification_screen.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ class __EmailVerificationScreenContentState
145145
super.initState();
146146
}
147147

148-
void _sendEmailVerification(_) {
148+
void _sendEmailVerification(void _) {
149149
controller
150150
..addListener(() {
151151
setState(() {});

packages/firebase_ui_auth/lib/src/screens/profile_screen.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,6 @@ class _EmailVerificationBadgeState extends State<_EmailVerificationBadge> {
422422
),
423423
const SizedBox(height: 16),
424424
if (state == EmailVerificationState.pending)
425-
// ignore: prefer_const_constructors
426425
Row(
427426
mainAxisAlignment: MainAxisAlignment.center,
428427
children: [
@@ -615,6 +614,8 @@ class _MFAToggleState extends State<_MFAToggle> {
615614
final mfa = widget.auth.currentUser!.multiFactor;
616615
final session = await mfa.getSession();
617616

617+
if (!mounted) return;
618+
618619
await startPhoneVerification(
619620
context: context,
620621
action: AuthAction.none,
@@ -637,7 +638,9 @@ class _MFAToggleState extends State<_MFAToggle> {
637638
isLoading = false;
638639
});
639640

640-
Navigator.of(context).popUntil((route) => route == currentRoute);
641+
if (context.mounted) {
642+
Navigator.of(context).popUntil((route) => route == currentRoute);
643+
}
641644
}
642645
})
643646
],

0 commit comments

Comments
 (0)