Skip to content

Commit e0b2fe9

Browse files
Bernhard MüllerMoralCode
authored andcommitted
Updated flutter lint to v5
1 parent 75234f8 commit e0b2fe9

File tree

9 files changed

+96
-64
lines changed

9 files changed

+96
-64
lines changed

analysis_options.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
include: package:pedantic/analysis_options.1.9.0.yaml
1+
include: package:lints/recommended.yaml
22
analyzer:

example/analysis_options.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include: package:lints/recommended.yaml
2+
analyzer:

example/lib/main.dart

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ void main() => runApp(MyApp());
55

66
class MyApp extends StatefulWidget {
77
@override
8-
_MyAppState createState() => _MyAppState();
8+
State<MyApp> createState() => _MyAppState();
99
}
1010

1111
class _MyAppState extends State<MyApp> {
@@ -33,14 +33,14 @@ class _MyAppState extends State<MyApp> {
3333
body: Center(
3434
child: ListView(
3535
children: <Widget>[
36-
locationData('Latitude: ' + latitude),
37-
locationData('Longitude: ' + longitude),
38-
locationData('Altitude: ' + altitude),
39-
locationData('Accuracy: ' + accuracy),
40-
locationData('Bearing: ' + bearing),
41-
locationData('Speed: ' + speed),
42-
locationData('Time: ' + time),
43-
locationData('IsServiceRunning: ' + serviceRunning.toString()),
36+
locationData('Latitude: $latitude'),
37+
locationData('Longitude: $longitude'),
38+
locationData('Altitude: $altitude'),
39+
locationData('Accuracy: $accuracy'),
40+
locationData('Bearing: $bearing'),
41+
locationData('Speed: $speed'),
42+
locationData('Time: $time'),
43+
locationData('IsServiceRunning: $serviceRunning'),
4444
ElevatedButton(
4545
onPressed: () async {
4646
await BackgroundLocation.setAndroidNotification(
@@ -116,7 +116,7 @@ class _MyAppState extends State<MyApp> {
116116

117117
void getCurrentLocation() {
118118
BackgroundLocation().getCurrentLocation().then((location) {
119-
print('This is current Location ' + location.toMap().toString());
119+
print('This is current Location ${location.toMap()}');
120120
});
121121
}
122122

example/pubspec.lock

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ packages:
1010
source: hosted
1111
version: "2.11.0"
1212
background_location:
13-
dependency: "direct dev"
13+
dependency: "direct main"
1414
description:
1515
path: ".."
1616
relative: true
@@ -78,18 +78,18 @@ packages:
7878
dependency: transitive
7979
description:
8080
name: leak_tracker
81-
sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
81+
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
8282
url: "https://pub.dev"
8383
source: hosted
84-
version: "10.0.4"
84+
version: "10.0.5"
8585
leak_tracker_flutter_testing:
8686
dependency: transitive
8787
description:
8888
name: leak_tracker_flutter_testing
89-
sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
89+
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
9090
url: "https://pub.dev"
9191
source: hosted
92-
version: "3.0.3"
92+
version: "3.0.5"
9393
leak_tracker_testing:
9494
dependency: transitive
9595
description:
@@ -98,6 +98,14 @@ packages:
9898
url: "https://pub.dev"
9999
source: hosted
100100
version: "3.0.1"
101+
lints:
102+
dependency: "direct dev"
103+
description:
104+
name: lints
105+
sha256: "3315600f3fb3b135be672bf4a178c55f274bebe368325ae18462c89ac1e3b413"
106+
url: "https://pub.dev"
107+
source: hosted
108+
version: "5.0.0"
101109
matcher:
102110
dependency: transitive
103111
description:
@@ -110,18 +118,18 @@ packages:
110118
dependency: transitive
111119
description:
112120
name: material_color_utilities
113-
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
121+
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
114122
url: "https://pub.dev"
115123
source: hosted
116-
version: "0.8.0"
124+
version: "0.11.1"
117125
meta:
118126
dependency: transitive
119127
description:
120128
name: meta
121-
sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
129+
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
122130
url: "https://pub.dev"
123131
source: hosted
124-
version: "1.12.0"
132+
version: "1.15.0"
125133
path:
126134
dependency: transitive
127135
description:
@@ -179,10 +187,10 @@ packages:
179187
dependency: transitive
180188
description:
181189
name: test_api
182-
sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
190+
sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
183191
url: "https://pub.dev"
184192
source: hosted
185-
version: "0.7.0"
193+
version: "0.7.2"
186194
vector_math:
187195
dependency: transitive
188196
description:
@@ -195,10 +203,10 @@ packages:
195203
dependency: transitive
196204
description:
197205
name: vm_service
198-
sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
206+
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
199207
url: "https://pub.dev"
200208
source: hosted
201-
version: "14.2.1"
209+
version: "14.2.5"
202210
sdks:
203-
dart: ">=3.3.0 <4.0.0"
211+
dart: ">=3.5.0 <4.0.0"
204212
flutter: ">=3.18.0-18.0.pre.54"

example/pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ dependencies:
99
flutter:
1010
sdk: flutter
1111
cupertino_icons: ^1.0.2
12+
background_location:
13+
path: ../
1214

1315
dev_dependencies:
1416
flutter_test:
1517
sdk: flutter
16-
17-
background_location:
18-
path: ../
18+
lints: ^5.0.0
1919

2020
# For information on the generic Dart part of this file, see the
2121
# following page: https://dart.dev/tools/pub/pubspec

example/test/widget_test.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
import 'package:flutter/material.dart';
99
import 'package:flutter_test/flutter_test.dart';
1010

11-
// ignore: avoid_relative_lib_imports
12-
import '../lib/main.dart';
11+
import 'package:background_location_example/main.dart';
1312

1413
void main() {
1514
testWidgets('Verify Platform version', (WidgetTester tester) async {

lib/background_location.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class BackgroundLocation {
5050
var completer = Completer<Location>();
5151

5252
getLocationUpdates((location) {
53-
var _location = Location(
53+
var loc = Location(
5454
latitude: location.latitude,
5555
longitude: location.longitude,
5656
accuracy: location.accuracy,
@@ -60,7 +60,7 @@ class BackgroundLocation {
6060
time: location.time,
6161
isMock: location.isMock,
6262
);
63-
completer.complete(_location);
63+
completer.complete(loc);
6464
});
6565

6666
return completer.future;

pubspec.lock

Lines changed: 54 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ packages:
3737
dependency: transitive
3838
description:
3939
name: collection
40-
sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687
40+
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
4141
url: "https://pub.dev"
4242
source: hosted
43-
version: "1.17.2"
43+
version: "1.18.0"
4444
fake_async:
4545
dependency: transitive
4646
description:
@@ -59,46 +59,70 @@ packages:
5959
description: flutter
6060
source: sdk
6161
version: "0.0.0"
62+
leak_tracker:
63+
dependency: transitive
64+
description:
65+
name: leak_tracker
66+
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
67+
url: "https://pub.dev"
68+
source: hosted
69+
version: "10.0.5"
70+
leak_tracker_flutter_testing:
71+
dependency: transitive
72+
description:
73+
name: leak_tracker_flutter_testing
74+
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
75+
url: "https://pub.dev"
76+
source: hosted
77+
version: "3.0.5"
78+
leak_tracker_testing:
79+
dependency: transitive
80+
description:
81+
name: leak_tracker_testing
82+
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
83+
url: "https://pub.dev"
84+
source: hosted
85+
version: "3.0.1"
86+
lints:
87+
dependency: "direct dev"
88+
description:
89+
name: lints
90+
sha256: "3315600f3fb3b135be672bf4a178c55f274bebe368325ae18462c89ac1e3b413"
91+
url: "https://pub.dev"
92+
source: hosted
93+
version: "5.0.0"
6294
matcher:
6395
dependency: transitive
6496
description:
6597
name: matcher
66-
sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
98+
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
6799
url: "https://pub.dev"
68100
source: hosted
69-
version: "0.12.16"
101+
version: "0.12.16+1"
70102
material_color_utilities:
71103
dependency: transitive
72104
description:
73105
name: material_color_utilities
74-
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
106+
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
75107
url: "https://pub.dev"
76108
source: hosted
77-
version: "0.5.0"
109+
version: "0.11.1"
78110
meta:
79111
dependency: transitive
80112
description:
81113
name: meta
82-
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
114+
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
83115
url: "https://pub.dev"
84116
source: hosted
85-
version: "1.9.1"
117+
version: "1.15.0"
86118
path:
87119
dependency: transitive
88120
description:
89121
name: path
90-
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
122+
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
91123
url: "https://pub.dev"
92124
source: hosted
93-
version: "1.8.3"
94-
pedantic:
95-
dependency: "direct dev"
96-
description:
97-
name: pedantic
98-
sha256: "67fc27ed9639506c856c840ccce7594d0bdcd91bc8d53d6e52359449a1d50602"
99-
url: "https://pub.dev"
100-
source: hosted
101-
version: "1.11.1"
125+
version: "1.9.0"
102126
sky_engine:
103127
dependency: transitive
104128
description: flutter
@@ -116,18 +140,18 @@ packages:
116140
dependency: transitive
117141
description:
118142
name: stack_trace
119-
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
143+
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
120144
url: "https://pub.dev"
121145
source: hosted
122-
version: "1.11.0"
146+
version: "1.11.1"
123147
stream_channel:
124148
dependency: transitive
125149
description:
126150
name: stream_channel
127-
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
151+
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
128152
url: "https://pub.dev"
129153
source: hosted
130-
version: "2.1.1"
154+
version: "2.1.2"
131155
string_scanner:
132156
dependency: transitive
133157
description:
@@ -148,10 +172,10 @@ packages:
148172
dependency: transitive
149173
description:
150174
name: test_api
151-
sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8"
175+
sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
152176
url: "https://pub.dev"
153177
source: hosted
154-
version: "0.6.0"
178+
version: "0.7.2"
155179
vector_math:
156180
dependency: transitive
157181
description:
@@ -160,14 +184,14 @@ packages:
160184
url: "https://pub.dev"
161185
source: hosted
162186
version: "2.1.4"
163-
web:
187+
vm_service:
164188
dependency: transitive
165189
description:
166-
name: web
167-
sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10
190+
name: vm_service
191+
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
168192
url: "https://pub.dev"
169193
source: hosted
170-
version: "0.1.4-beta"
194+
version: "14.2.5"
171195
sdks:
172-
dart: ">=3.1.0 <4.0.0"
173-
flutter: ">=3.0.0"
196+
dart: ">=3.5.0 <4.0.0"
197+
flutter: ">=3.18.0-18.0.pre.54"

pubspec.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ dependencies:
1717
dev_dependencies:
1818
flutter_test:
1919
sdk: flutter
20-
#test: ^1.16.8
21-
pedantic: ^1.11.1
20+
lints: ^5.0.0
2221

2322
flutter:
2423
plugin:

0 commit comments

Comments
 (0)