fluttercommunity / fluttercommunity/flutter_downloader

loadTasks doesn't return tasks reliably on simulator iPhone 12 iOS 14.5

Open
#494 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
940
Forks
561
Avg merge
1h 18m
Merged PRs (30d)
1

Description

I followed the setup instructions exactly.
I'm starting downloads from a method like so, which does show progress in the callback (exactly as in the docs):

```
Future startDownload(String url) async {
Directory directory = await getApplicationDocumentsDirectory();
final taskId = await FlutterDownloader.enqueue(
url: url,
savedDir: directory.path,
showNotification: true, // Android only
openFileFromNotification: false, // Android only
);
return taskId;
}
```

Yet, calling the method as described in the docs:

```
List? tasks = await FlutterDownloader.loadTasks();
```

Often results in zero results, even though you have started a download prior.
This seems completely random.

I've also tried with a query with the same result, zero items. e.g.

```
List? tasks = await FlutterDownloader.loadTasksWithRawQuery(
query: "SELECT * FROM task",
);
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.