Skip to content

Commit 88e59c3

Browse files
authored
chore: update lints across packages (#13007)
1 parent e7bd788 commit 88e59c3

File tree

25 files changed

+53
-63
lines changed

25 files changed

+53
-63
lines changed

packages/firebase_app_installations/firebase_app_installations/example/lib/main.dart

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

55
import 'dart:developer';
6-
import 'package:flutter/material.dart';
7-
import 'package:firebase_core/firebase_core.dart';
6+
87
import 'package:firebase_app_installations/firebase_app_installations.dart';
8+
import 'package:firebase_core/firebase_core.dart';
9+
import 'package:flutter/material.dart';
910

1011
import 'firebase_options.dart';
1112

@@ -20,7 +21,7 @@ void main() async {
2021
}
2122

2223
class MyApp extends StatelessWidget {
23-
const MyApp({Key? key}) : super(key: key);
24+
const MyApp({super.key});
2425

2526
@override
2627
Widget build(BuildContext context) {
@@ -37,10 +38,10 @@ class MyApp extends StatelessWidget {
3738
}
3839

3940
class InstallationsCard extends StatefulWidget {
40-
const InstallationsCard({Key? key}) : super(key: key);
41+
const InstallationsCard({super.key});
4142

4243
@override
43-
_InstallationsCardState createState() => _InstallationsCardState();
44+
State<InstallationsCard> createState() => _InstallationsCardState();
4445
}
4546

4647
class _InstallationsCardState extends State<InstallationsCard> {
@@ -58,6 +59,7 @@ class _InstallationsCardState extends State<InstallationsCard> {
5859
// Make sure that the Auth Token is updated once the Installation Id is updated
5960
getAuthToken();
6061

62+
// ignore: use_build_context_synchronously
6163
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
6264
content: Text('New Firebase Installations Id generated 🎉'),
6365
backgroundColor: Colors.green,
@@ -89,10 +91,10 @@ class _InstallationsCardState extends State<InstallationsCard> {
8991

9092
Future<void> getId() async {
9193
try {
92-
final _newid = await FirebaseInstallations.instance.getId();
94+
final newId = await FirebaseInstallations.instance.getId();
9395

9496
setState(() {
95-
id = _newid;
97+
id = newId;
9698
});
9799
} catch (e) {
98100
log('$e');

packages/firebase_app_installations/firebase_app_installations/example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ dependencies:
1515
sdk: flutter
1616

1717
dev_dependencies:
18-
flutter_lints: ^1.0.0
18+
flutter_lints: ^4.0.0
1919

2020
flutter:
2121
uses-material-design: true

packages/firebase_app_installations/firebase_app_installations_platform_interface/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ dev_dependencies:
2020
firebase_core_platform_interface: ^5.1.0
2121
flutter_test:
2222
sdk: flutter
23-
flutter_lints: ^1.0.0
23+
flutter_lints: ^4.0.0

packages/firebase_app_installations/firebase_app_installations_web/lib/firebase_app_installations_web.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
library firebase_app_installations_web;
6-
5+
import 'package:firebase_app_installations_platform_interface/firebase_app_installations_platform_interface.dart';
76
import 'package:firebase_core/firebase_core.dart';
87
import 'package:firebase_core_web/firebase_core_web.dart';
98
import 'package:firebase_core_web/firebase_core_web_interop.dart'
109
as core_interop;
11-
import 'package:firebase_app_installations_platform_interface/firebase_app_installations_platform_interface.dart';
1210
import 'package:flutter_web_plugins/flutter_web_plugins.dart';
1311

1412
import 'src/guard.dart';

packages/firebase_app_installations/firebase_app_installations_web/lib/src/interop/installations.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ class Installations
2727
return _expando[jsObject] ??= Installations._fromJsObject(jsObject);
2828
}
2929

30-
Installations._fromJsObject(
31-
installations_interop.InstallationsJsImpl jsObject)
32-
: super.fromJsObject(jsObject);
30+
Installations._fromJsObject(super.jsObject) : super.fromJsObject();
3331

3432
Future<void> delete() =>
3533
(installations_interop.deleteInstallations(jsObject)).toDart;

packages/firebase_app_installations/firebase_app_installations_web/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ dependencies:
1717
sdk: flutter
1818
flutter_web_plugins:
1919
sdk: flutter
20-
20+
2121
dev_dependencies:
2222
firebase_core_platform_interface: ^5.1.0
2323
flutter_test:
2424
sdk: flutter
25-
flutter_lints: ^1.0.0
25+
flutter_lints: ^4.0.0
2626

2727
flutter:
2828
plugin:

packages/firebase_database/firebase_database_web/lib/firebase_database_web.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
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-
library firebase_database_web;
6-
75
import 'dart:async';
86
import 'dart:js_interop';
97
import 'package:collection/collection.dart';
@@ -49,8 +47,7 @@ class FirebaseDatabaseWeb extends DatabasePlatform {
4947

5048
/// Builds an instance of [DatabaseWeb] with an optional [FirebaseApp] instance
5149
/// If [app] is null then the created instance will use the default [FirebaseApp]
52-
FirebaseDatabaseWeb({FirebaseApp? app, String? databaseURL})
53-
: super(app: app, databaseURL: databaseURL);
50+
FirebaseDatabaseWeb({super.app, super.databaseURL});
5451

5552
@override
5653
DatabasePlatform delegateFor(

packages/firebase_database/firebase_database_web/lib/src/data_snapshot_web.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-
part of firebase_database_web;
5+
part of '../firebase_database_web.dart';
66

77
/// Web implementation for firebase [DataSnapshotPlatform]
88
class DataSnapshotWeb extends DataSnapshotPlatform {

packages/firebase_database/firebase_database_web/lib/src/database_event_web.dart

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

5-
part of firebase_database_web;
5+
part of '../firebase_database_web.dart';
66

77
/// Web implementation for firebase [DataSnapshotPlatform]
88
class DatabaseEventWeb extends DatabaseEventPlatform {

packages/firebase_database/firebase_database_web/lib/src/database_reference_web.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
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-
part of firebase_database_web;
5+
part of '../firebase_database_web.dart';
66

77
/// Web implementation for firebase [DatabaseReferencePlatform]
88
class DatabaseReferenceWeb extends QueryWeb
99
implements DatabaseReferencePlatform {
1010
/// Builds an instance of [DatabaseReferenceWeb] delegating to a package:firebase [DatabaseReferencePlatform]
1111
/// to delegate queries to underlying firebase web plugin
1212
DatabaseReferenceWeb(
13-
DatabasePlatform _database,
13+
DatabasePlatform database,
1414
this._delegate,
15-
) : super(_database, _delegate);
15+
) : super(database, _delegate);
1616

1717
final database_interop.DatabaseReference _delegate;
1818

0 commit comments

Comments
 (0)