Skip to content

Commit

Permalink
Bump dependencies and fix linter warnings (#946)
Browse files Browse the repository at this point in the history
* bump dependencies and fix linter warnings

* downgrade leancode_lint

* downgrade more deps
  • Loading branch information
bartekpacia authored Apr 9, 2024
1 parent 6eb6cba commit 4912975
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/prepare.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
flutter-version: ["3.19.x"]
flutter-version: ["3.10.x", "3.13.x", "3.16.x", "3.19.x"]

steps:
- name: Clone repository
Expand Down
2 changes: 1 addition & 1 deletion example/lib/data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class DownloadItems {
name: 'Spitfire',
url:
'https://github.com/bartekpacia/spitfire/releases/download/v1.2.0/spitfire.apk',
)
),
];
}

Expand Down
8 changes: 4 additions & 4 deletions example/lib/download_list_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class DownloadListItem extends StatelessWidget {
constraints: const BoxConstraints(minHeight: 32, minWidth: 32),
icon: const Icon(Icons.delete),
tooltip: 'Delete',
)
),
],
);
} else if (task.status == DownloadTaskStatus.canceled) {
Expand All @@ -81,7 +81,7 @@ class DownloadListItem extends StatelessWidget {
constraints: const BoxConstraints(minHeight: 32, minWidth: 32),
icon: const Icon(Icons.cancel),
tooltip: 'Cancel',
)
),
],
);
} else if (task.status == DownloadTaskStatus.failed) {
Expand All @@ -95,7 +95,7 @@ class DownloadListItem extends StatelessWidget {
constraints: const BoxConstraints(minHeight: 32, minWidth: 32),
icon: const Icon(Icons.refresh, color: Colors.green),
tooltip: 'Refresh',
)
),
],
);
} else if (task.status == DownloadTaskStatus.enqueued) {
Expand Down Expand Up @@ -147,7 +147,7 @@ class DownloadListItem extends StatelessWidget {
child: LinearProgressIndicator(
value: data!.task!.progress! / 100,
),
)
),
],
),
),
Expand Down
8 changes: 5 additions & 3 deletions example/lib/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,11 @@ class _MyHomePageState extends State<MyHomePage> {
return DownloadListItem(
data: item,
onTap: (task) async {
final scaffoldMessenger = ScaffoldMessenger.of(context);

final success = await _openDownloadedFile(task);
if (!success) {
ScaffoldMessenger.of(context).showSnackBar(
scaffoldMessenger.showSnackBar(
const SnackBar(
content: Text('Cannot open this file'),
),
Expand Down Expand Up @@ -192,7 +194,7 @@ class _MyHomePageState extends State<MyHomePage> {
fontSize: 20,
),
),
)
),
],
),
);
Expand Down Expand Up @@ -391,7 +393,7 @@ class _MyHomePageState extends State<MyHomePage> {
),
),
],
)
),
],
),
body: Builder(
Expand Down
6 changes: 3 additions & 3 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ version: 1.0.0+1
publish_to: none

environment:
sdk: '>=3.0.0 <4.0.0'
flutter: '>=3.10.0'
sdk: ">=3.0.0 <4.0.0"
flutter: ">=3.10.0"

dependencies:
android_path_provider: ^0.3.0
Expand All @@ -14,7 +14,7 @@ dependencies:
sdk: flutter
flutter_downloader:
path: ../
path_provider: ^2.0.11
path_provider: ^2.1.2
permission_handler: ^10.0.0

dev_dependencies:
Expand Down

0 comments on commit 4912975

Please sign in to comment.