Skip to content

Commit 110559c

Browse files
committed
feat: require Dart 3.9.0
Reformatted
1 parent 1535fac commit 110559c

File tree

146 files changed

+2283
-3129
lines changed

Some content is hidden

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

146 files changed

+2283
-3129
lines changed

packages/firebase_ui_auth/example/lib/decorations.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,7 @@ SideBuilder sideIcon(IconData icon) {
4242
return (context, constraints) {
4343
return Padding(
4444
padding: const EdgeInsets.all(20),
45-
child: Icon(
46-
icon,
47-
color: Colors.blue,
48-
size: constraints.maxWidth / 3,
49-
),
45+
child: Icon(icon, color: Colors.blue, size: constraints.maxWidth / 3),
5046
);
5147
};
5248
}

packages/firebase_ui_auth/example/lib/main.dart

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -85,18 +85,16 @@ class FirebaseAuthUIExample extends StatelessWidget {
8585
),
8686
);
8787

88-
final mfaAction = AuthStateChangeAction<MFARequired>(
89-
(context, state) async {
90-
final nav = Navigator.of(context);
88+
final mfaAction = AuthStateChangeAction<MFARequired>((
89+
context,
90+
state,
91+
) async {
92+
final nav = Navigator.of(context);
9193

92-
await startMFAVerification(
93-
resolver: state.resolver,
94-
context: context,
95-
);
94+
await startMFAVerification(resolver: state.resolver, context: context);
9695

97-
nav.pushReplacementNamed('/profile');
98-
},
99-
);
96+
nav.pushReplacementNamed('/profile');
97+
});
10098

10199
return MaterialApp(
102100
theme: ThemeData(
@@ -224,14 +222,15 @@ class FirebaseAuthUIExample extends StatelessWidget {
224222
);
225223
},
226224
'/sms': (context) {
227-
final arguments = ModalRoute.of(context)?.settings.arguments
228-
as Map<String, dynamic>?;
225+
final arguments =
226+
ModalRoute.of(context)?.settings.arguments
227+
as Map<String, dynamic>?;
229228

230229
return SMSCodeInputScreen(
231230
actions: [
232231
AuthStateChangeAction<SignedIn>((context, state) {
233232
Navigator.of(context).pushReplacementNamed('/profile');
234-
})
233+
}),
235234
],
236235
flowKey: arguments?['flowKey'],
237236
action: arguments?['action'],
@@ -240,8 +239,9 @@ class FirebaseAuthUIExample extends StatelessWidget {
240239
);
241240
},
242241
'/forgot-password': (context) {
243-
final arguments = ModalRoute.of(context)?.settings.arguments
244-
as Map<String, dynamic>?;
242+
final arguments =
243+
ModalRoute.of(context)?.settings.arguments
244+
as Map<String, dynamic>?;
245245

246246
return ForgotPasswordScreen(
247247
email: arguments?['email'],
@@ -274,7 +274,8 @@ class FirebaseAuthUIExample extends StatelessWidget {
274274
mfaAction,
275275
],
276276
actionCodeSettings: actionCodeSettings,
277-
showMFATile: kIsWeb ||
277+
showMFATile:
278+
kIsWeb ||
278279
platform == TargetPlatform.iOS ||
279280
platform == TargetPlatform.android,
280281
showUnlinkConfirmationDialog: true,
@@ -375,10 +376,7 @@ class _AppTrackingTransparencyCardState
375376
children: [
376377
const Text('App tracking allowed'),
377378
const SizedBox(width: 12),
378-
Switch(
379-
value: _isAllowed,
380-
onChanged: _onToggleChanged,
381-
),
379+
Switch(value: _isAllowed, onChanged: _onToggleChanged),
382380
],
383381
),
384382
);

packages/firebase_ui_auth/example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
1818
version: 1.0.0+1
1919

2020
environment:
21-
sdk: ^3.5.0
21+
sdk: ^3.9.0
2222

2323
resolution: workspace
2424

packages/firebase_ui_auth/lib/src/actions.dart

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,8 @@ class AccountDeletedAction extends FirebaseUIAction {
103103
/// {@endtemplate}
104104
class DisplayNameChangedAction extends FirebaseUIAction {
105105
/// A callback that is being called when user has changed their display name.
106-
final void Function(
107-
BuildContext context,
108-
String? oldName,
109-
String newName,
110-
) callback;
106+
final void Function(BuildContext context, String? oldName, String newName)
107+
callback;
111108

112109
/// {@macro ui.auth.actions.display_name_changed}
113110
DisplayNameChangedAction(this.callback);

packages/firebase_ui_auth/lib/src/auth_flow.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,10 @@ class AuthFlow<T extends AuthProvider> extends ValueNotifier<AuthState>
100100

101101
/// {@macro ui.auth.auth_action}
102102
AuthAction? action,
103-
}) : auth = auth ?? fba.FirebaseAuth.instance,
104-
_action = action,
105-
_provider = provider,
106-
super(initialState) {
103+
}) : auth = auth ?? fba.FirebaseAuth.instance,
104+
_action = action,
105+
_provider = provider,
106+
super(initialState) {
107107
_provider.authListener = this;
108108
_provider.auth = auth ?? fba.FirebaseAuth.instance;
109109
}

packages/firebase_ui_auth/lib/src/auth_state.dart

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,8 @@ class AuthStateTransition<T extends AuthController> extends Notification {
199199
AuthStateTransition(this.from, this.to, this.controller);
200200
}
201201

202-
typedef AuthStateListenerCallback<T extends AuthController> = bool? Function(
203-
AuthState oldState,
204-
AuthState state,
205-
T controller,
206-
);
202+
typedef AuthStateListenerCallback<T extends AuthController> =
203+
bool? Function(AuthState oldState, AuthState state, T controller);
207204

208205
/// {@template ui.auth.auth_state.auth_state_listener}
209206
/// A [Widget] that could be used to listen auth state transitions.

packages/firebase_ui_auth/lib/src/configs/countries.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ final countries = [
5353
{
5454
'name': 'Democratic Republic of the Congo',
5555
'phoneCode': '243',
56-
'countryCode': 'CD'
56+
'countryCode': 'CD',
5757
},
5858
{'name': 'Denmark', 'phoneCode': '45', 'countryCode': 'DK'},
5959
{'name': 'Djibouti', 'phoneCode': '253', 'countryCode': 'DJ'},
@@ -166,12 +166,12 @@ final countries = [
166166
{
167167
'name': 'Saint Pierre and Miquelon',
168168
'phoneCode': '508',
169-
'countryCode': 'PM'
169+
'countryCode': 'PM',
170170
},
171171
{
172172
'name': 'Saint Vincent and the Grenadines',
173173
'phoneCode': '1-784',
174-
'countryCode': 'VC'
174+
'countryCode': 'VC',
175175
},
176176
{'name': 'Samoa', 'phoneCode': '685', 'countryCode': 'WS'},
177177
{'name': 'Sao Tome and Principe', 'phoneCode': '239', 'countryCode': 'ST'},
@@ -202,7 +202,7 @@ final countries = [
202202
{
203203
'name': 'Turks and Caicos Islands',
204204
'phoneCode': '1-649',
205-
'countryCode': 'TC'
205+
'countryCode': 'TC',
206206
},
207207
{'name': 'U.S. Virgin Islands', 'phoneCode': '1-340', 'countryCode': 'VI'},
208208
{'name': 'Uganda', 'phoneCode': '256', 'countryCode': 'UG'},
@@ -216,7 +216,7 @@ final countries = [
216216
{'name': 'Vietnam', 'phoneCode': '84', 'countryCode': 'VN'},
217217
{'name': 'Yemen', 'phoneCode': '967', 'countryCode': 'YE'},
218218
{'name': 'Zambia', 'phoneCode': '260', 'countryCode': 'ZM'},
219-
{'name': 'Zimbabwe', 'phoneCode': '263', 'countryCode': 'ZW'}
219+
{'name': 'Zimbabwe', 'phoneCode': '263', 'countryCode': 'ZW'},
220220
].map(_CountryCodeItem.fromJson);
221221

222222
final countriesByCountryCode = countries.fold<Map<String, _CountryCodeItem>>(

packages/firebase_ui_auth/lib/src/email_verification.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ class EmailVerificationController extends ValueNotifier<EmailVerificationState>
4747
StreamSubscription<Uri>? _linkSubscription;
4848

4949
EmailVerificationController(this.auth, {AppLinks? appLinks})
50-
: _appLinks = appLinks ?? AppLinks(),
51-
super(EmailVerificationState.unresolved) {
50+
: _appLinks = appLinks ?? AppLinks(),
51+
super(EmailVerificationState.unresolved) {
5252
final user = auth.currentUser;
5353

5454
if (user != null) {

packages/firebase_ui_auth/lib/src/flows/email_flow.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,7 @@ class EmailAuthFlow extends AuthFlow<EmailAuthProvider>
3939

4040
/// {@macro ui.auth.auth_action}
4141
super.action,
42-
}) : super(
43-
initialState: AwaitingEmailAndPassword(),
44-
provider: provider,
45-
);
42+
}) : super(initialState: AwaitingEmailAndPassword(), provider: provider);
4643

4744
@override
4845
void onBeforeSignIn() {

packages/firebase_ui_auth/lib/src/flows/email_link_flow.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,7 @@ class EmailLinkFlow extends AuthFlow<EmailLinkAuthProvider>
3838

3939
/// {@macro ui.auth.auth_flow.ctor.provider}
4040
required super.provider,
41-
}) : super(
42-
action: AuthAction.signIn,
43-
initialState: const Uninitialized(),
44-
);
41+
}) : super(action: AuthAction.signIn, initialState: const Uninitialized());
4542

4643
@override
4744
void sendLink(String email) {

0 commit comments

Comments
 (0)