Skip to content

Commit 4912975

Browse files
authored
Bump dependencies and fix linter warnings (#946)
* bump dependencies and fix linter warnings * downgrade leancode_lint * downgrade more deps
1 parent 6eb6cba commit 4912975

File tree

5 files changed

+14
-12
lines changed

5 files changed

+14
-12
lines changed

.github/workflows/prepare.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
flutter-version: ["3.19.x"]
16+
flutter-version: ["3.10.x", "3.13.x", "3.16.x", "3.19.x"]
1717

1818
steps:
1919
- name: Clone repository

example/lib/data.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class DownloadItems {
5353
name: 'Spitfire',
5454
url:
5555
'https://github.com/bartekpacia/spitfire/releases/download/v1.2.0/spitfire.apk',
56-
)
56+
),
5757
];
5858
}
5959

example/lib/download_list_item.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class DownloadListItem extends StatelessWidget {
6666
constraints: const BoxConstraints(minHeight: 32, minWidth: 32),
6767
icon: const Icon(Icons.delete),
6868
tooltip: 'Delete',
69-
)
69+
),
7070
],
7171
);
7272
} else if (task.status == DownloadTaskStatus.canceled) {
@@ -81,7 +81,7 @@ class DownloadListItem extends StatelessWidget {
8181
constraints: const BoxConstraints(minHeight: 32, minWidth: 32),
8282
icon: const Icon(Icons.cancel),
8383
tooltip: 'Cancel',
84-
)
84+
),
8585
],
8686
);
8787
} else if (task.status == DownloadTaskStatus.failed) {
@@ -95,7 +95,7 @@ class DownloadListItem extends StatelessWidget {
9595
constraints: const BoxConstraints(minHeight: 32, minWidth: 32),
9696
icon: const Icon(Icons.refresh, color: Colors.green),
9797
tooltip: 'Refresh',
98-
)
98+
),
9999
],
100100
);
101101
} else if (task.status == DownloadTaskStatus.enqueued) {
@@ -147,7 +147,7 @@ class DownloadListItem extends StatelessWidget {
147147
child: LinearProgressIndicator(
148148
value: data!.task!.progress! / 100,
149149
),
150-
)
150+
),
151151
],
152152
),
153153
),

example/lib/home_page.dart

+5-3
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,11 @@ class _MyHomePageState extends State<MyHomePage> {
137137
return DownloadListItem(
138138
data: item,
139139
onTap: (task) async {
140+
final scaffoldMessenger = ScaffoldMessenger.of(context);
141+
140142
final success = await _openDownloadedFile(task);
141143
if (!success) {
142-
ScaffoldMessenger.of(context).showSnackBar(
144+
scaffoldMessenger.showSnackBar(
143145
const SnackBar(
144146
content: Text('Cannot open this file'),
145147
),
@@ -192,7 +194,7 @@ class _MyHomePageState extends State<MyHomePage> {
192194
fontSize: 20,
193195
),
194196
),
195-
)
197+
),
196198
],
197199
),
198200
);
@@ -391,7 +393,7 @@ class _MyHomePageState extends State<MyHomePage> {
391393
),
392394
),
393395
],
394-
)
396+
),
395397
],
396398
),
397399
body: Builder(

example/pubspec.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ version: 1.0.0+1
44
publish_to: none
55

66
environment:
7-
sdk: '>=3.0.0 <4.0.0'
8-
flutter: '>=3.10.0'
7+
sdk: ">=3.0.0 <4.0.0"
8+
flutter: ">=3.10.0"
99

1010
dependencies:
1111
android_path_provider: ^0.3.0
@@ -14,7 +14,7 @@ dependencies:
1414
sdk: flutter
1515
flutter_downloader:
1616
path: ../
17-
path_provider: ^2.0.11
17+
path_provider: ^2.1.2
1818
permission_handler: ^10.0.0
1919

2020
dev_dependencies:

0 commit comments

Comments
 (0)