Last updated:
0 purchases
http downloader
Http Downloader #
Simply download your files from the internet and save them to the desired location on your device.
Download your files from the internet and see the progress while downloading. Edit the progress bar as you wish. You can adjust the view before the download starts and after the download is complete. If you do not set it, it will remain as default.
Usage #
Use HttpDownloaderWidget() where the download progress will be.
HttpDownloaderWidget(
url: (Link of the file you want to download ex. (https://google.com/example.png)),
path: (Location to save the file ex. C:\\Users\\YourName\\Desktop),
fileName: (The name to save the file ex. image.png)
):
Example #
If you do this example, it will have the default view.
HttpDownloaderWidget(
url: "https://google.com/example.png",
path: "C:\\Users\\YourName\\Desktop",
fileName: "image.png"
)
copied to clipboard
You can customize it this way.
HttpDownloaderWidget(
url: "https://google.com/example.png",
path: "C:\\Users\\YourName\\Desktop",
fileName: "image.png"
startDownloadWidget: (download) {
return ElevatedButton(
onPressed: download,
child: Text("Download"),
);
},
downloadingWidget: (progress, downloadedMB, contentMB) {
return Column(
children: [
Text("Downloading.. ${progress.toString()}%", style: TextStyle(color: Colors.black)),
SizedBox(
width: 400,
child: LinearProgressIndicator(
value: progress / 100,
borderRadius: BorderRadius.circular(10),
color: Colors.red,
),
),
Text("$downloadedMB MB / $contentMB MB", style: TextStyle(color: Colors.amber)),
],
);
},
downloadedWidget: const Text("Download Completed"),
)
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.