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

Offer waiting for a specific download task #253

Open
MarcelGarus opened this issue Mar 2, 2020 · 2 comments
Open

Offer waiting for a specific download task #253

MarcelGarus opened this issue Mar 2, 2020 · 2 comments

Comments

@MarcelGarus
Copy link

MarcelGarus commented Mar 2, 2020

It would be great if the end-developer could just wait for a certain task, perhaps by calling something in the likes of await FlutterDownloader.waitForTask(taskId);

It wouldn't be too hard to implement – especially after #252 is implemented, there's already a stream of updates coming from the background isolate, so the function could simply create a Completer and complete that when the right update event comes through.

@SpanishOnion
Copy link

I think this API is necessary, and here we need a state value that can represent the queuing, and we can switch the state to paused.

@MarcelGarus
Copy link
Author

I'm currently implementing the new API mentioned in this other issue. In this new API, DownloadTasks are powerful objects, so these will get a new wait method that waits for the download to complete or fail or getting canceled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants