Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump dependencies and fix linter warnings #946

Merged
merged 3 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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