flutter_downloader icon indicating copy to clipboard operation
flutter_downloader copied to clipboard

Using Fetch2 in android plugin

Open OmidNejadabbasi opened this issue 3 years ago • 1 comments

Recently I was using flutter_downloader package for a personal project. I wrote my program and found out it is not as performant as I want it to be. So I decided to look at the source code to see if there is a way to make it better. I saw that in the android version you are using simple HttpConnection to download files. I thought it is better to use Fetch2 as the underlying downloader for android. It is more stable and resuming downloads is more reliable. And also it uses multiple threads to download the files so it is much faster. And also it gives us the parts that are being downloaded and we can have more detailed progress info. After reading some source code I saw that using Fetch2 will shrink the android code a lot and is so straightforward.

Now the problem is that I can't compile the android code. Your build.gradle file is so different from the one mentioned in flutter.dev. And you are missing build.gradle in app folder of android code.

Can you give help about compiling this project?

Also give me your opinion about using Fetch2.

OmidNejadabbasi avatar May 27 '22 18:05 OmidNejadabbasi

I've not heard of Fetch2. I definitely don't have time to even start looking into that, so if you'd like to change the implementation on Android to use Fetch2, you're on your own.

Can you give help about compiling this project?

What exactly do you mean?

bartekpacia avatar Jul 20 '22 21:07 bartekpacia