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

Add cancel button for downloading progress [Feature Request] #101

Open
yahu1031 opened this issue Jun 21, 2021 · 9 comments
Open

Add cancel button for downloading progress [Feature Request] #101

yahu1031 opened this issue Jun 21, 2021 · 9 comments
Assignees
Labels
enhancement New feature or request

Comments

@yahu1031
Copy link

Show cancel button on loading progress.

Additional context
On-Hover the loading must show up the cancel button. So that the UI will be clean and that will give a good UX.

As I haven't checked out the code, I don't have the idea of how to do. But this is a feature request that will be helping the users to cancel their downloads.

@leoafarias
Copy link
Member

Thanks @yahu1031 will add to the backlog. There is some refactor planned for this, as to cancel we need to spin up a separate isolate it seems, to make sure it gets killed consistently. However, this was implemented on the sandbox feature and we should be able to bring it over.

@leoafarias leoafarias self-assigned this Jun 21, 2021
@leoafarias leoafarias added the enhancement New feature or request label Jun 21, 2021
@goldcoders
Copy link

is it possible to implement pause download and resume at different app session ?
lets say you pause and you close the app and next you opent the app again to
resume download.

Is that possible , right now i think dio is not capable of it or do we need to use other downloader like flutter_downloader?

@leoafarias
Copy link
Member

@goldcoders the download is done through fvm which follows the flutter install instructions through git… the initial clone which is fairly small and installs de dependencies separately. If the process fails in the middle but after the initial git clone, the process will resume and not redownload

@yahu1031
Copy link
Author

We can go with api calls instead of git commands. So that we can reduce usage of commands. Where this download progress can be cancelled.

@leoafarias
Copy link
Member

@yahu1031 API calls to where? would it be an http download call to the zip file?

@yahu1031
Copy link
Author

Yes

@leoafarias
Copy link
Member

@yahu1031 The only problem with this approach is that the initial github clone last time I checked is around 80MB, while the zip is closer to 2GB because contains all dependencies for all platforms.

@yahu1031
Copy link
Author

In that case, we can use github api calls

@leoafarias
Copy link
Member

The correct way to do this is to wrap the process on an isolate and cancel the isolate as it will kill the clone program.. after that go ahead and do any clean-up needed on the directory.

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

No branches or pull requests

3 participants