sidekick icon indicating copy to clipboard operation
sidekick copied to clipboard

Add cancel button for downloading progress [Feature Request]

Open yahu1031 opened this issue 4 years ago • 9 comments
trafficstars

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.

yahu1031 avatar Jun 21 '21 06:06 yahu1031

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 avatar Jun 21 '21 14:06 leoafarias

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?

goldcoders avatar Sep 18 '21 11:09 goldcoders

@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

leoafarias avatar Sep 18 '21 14:09 leoafarias

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.

yahu1031 avatar Jun 16 '22 13:06 yahu1031

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

leoafarias avatar Jun 20 '22 15:06 leoafarias

Yes

yahu1031 avatar Jun 20 '22 15:06 yahu1031

@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.

leoafarias avatar Jun 22 '22 13:06 leoafarias

In that case, we can use github api calls

yahu1031 avatar Jun 22 '22 13:06 yahu1031

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.

leoafarias avatar Jun 28 '22 16:06 leoafarias