download_pad

Creator: coderz1093

Last updated:

0 purchases

download_pad Image
download_pad Images

Languages

Categories

Add to Cart

Description:

download pad

download_pad #
This is a flutter package to download files from url. All you need is to pass the file url, file name that you want to save as, and the download directory where you want to save the file.

Github: https://github.com/evanemran/flutter_timer_widget

Parameters #

url - of the file
fileName - a name that you want to save as the downloaded file
dir - the directory where you want to save the file

Don't forget to add these permissions to your manifest file.
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/>
copied to clipboard
How to Use #
Step 1:
Add this line to your dependencies:
download_pad: ^0.0.1
copied to clipboard
import 'package:download_pad/download_pad.dart';
copied to clipboard
Step 1:
Call the DownloadPad class method downloadFile() and pass the parameters. Here is a quick example:
void startDownload() async {
String url = "https://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885__480.jpg";
Directory path = await getApplicationDocumentsDirectory();
String dir = path.path;
DownloadPad.downloadFile(url, "my_file", dir);
}
copied to clipboard
Conclusion #
This is an initial release of the package. If you find any issue please let me know I will fix it accordingly.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.