al_downloader
एक URL-आधारित Flutter डाउनलोडर जो किसी भी प्रकार के फ़ाइल को डाउनलोड करने के समर्थन करता है और बहुत सारी चीजों को स्वचालित रूप से प्रबंधित करता है।
एक URL-आधारित Flutter डाउनलोडर जो किसी भी प्रकार के फ़ाइल को डाउनलोड करने के समर्थन करता है और बहुत सारी चीजों को स्वचालित रूप से प्रबंधित करता है।
यह अंग्रेज़ी मूल स्नैपशॉट है। नवीनतम सामग्री GitHub पर देखें।
A URL-based flutter downloader that supports to download any type of file and automatically manages a lot of things.
If you need Chinese Document, click here.
Native Config: same as flutter_downloader native config
add the following line to your pubspec.yaml
dependencies:
al_downloader: ^1.8.4
run the following line with your command line
flutter packages get
import the following line, then you can use al_downloader
import 'package:al_downloader/al_downloader.dart';
ALDownloader.initialize();
ALDownloader.configurePrint(true, frequentEnabled: false);
ALDownloader.download(url,
directoryPath: directoryPath,
fileName: fileName,
handlerInterface:
ALDownloaderHandlerInterface(progressHandler: (progress) {
debugPrint(
'ALDownloader | download progress = $progress, url = $url\n');
}, succeededHandler: () {
debugPrint('ALDownloader | download succeeded, url = $url\n');
}, failedHandler: () {
debugPrint('ALDownloader | download failed, url = $url\n');
}, pausedHandler: () {
debugPrint('ALDownloader | download paused, url = $url\n');
}));
ALDownloader.addHandlerInterface(
ALDownloaderHandlerInterface(progressHandler: (progress) {
debugPrint(
'ALDownloader | download progress = $progress, url = $url\n');
}, succeededHandler: () {
debugPrint('ALDownloader | download succeeded, url = $url\n');
}, failedHandler: () {
debugPrint('ALDownloader | download failed, url = $url\n');
}, pausedHandler: () {
debugPrint('ALDownloader | download paused, url = $url\n');
}),
url);
ALDownloader.addForeverHandlerInterface(
ALDownloaderHandlerInterface(progressHandler: (progress) {
debugPrint(
'ALDownloader | download progress = $progress, url = $url\n');
}, succeededHandler: () {
debugPrint('ALDownloader | download succeeded, url = $url\n');
}, failedHandler: () {
debugPrint('ALDownloader | download failed, url = $url\n');
}, pausedHandler: () {
debugPrint('ALDownloader | download paused, url = $url\n');
}),
url);
ALDownloader.removeHandlerInterfaceForUrl(url);
/// Stop download, but the incomplete data will not be deleted.
ALDownloader.pause(url);
/// Stop download, and the incomplete data will be deleted.
ALDownloader.cancel(url);
/// Remove download, and all the data will be deleted.
ALDownloader.remove(url);
final status = await ALDownloader.getStatusForUrl(url);
final progress = await ALDownloader.getProgressForUrl(url);
final task = await ALDownloader.getTaskForUrl(url);
final tasks = await ALDownloader.tasks;
ALDownloaderBatcher.download(urls,
handlerInterface:
ALDownloaderHandlerInterface(progressHandler: (progress) {
debugPrint('ALDownloader | batch | download progress = $progress\n');
}, succeededHandler: () {
debugPrint('ALDownloader | batch | download succeeded\n');
}, failedHandler: () {
debugPrint('ALDownloader | batch | download failed\n');
}, pausedHandler: () {
debugPrint('ALDownloader | batch | download paused\n');
}));
ALDownloaderBatcher.addHandlerInterface(
ALDownloaderHandlerInterface(progressHandler: (progress) {
debugPrint('ALDownloader | batch | download progress = $progress\n');
}, succeededHandler: () {
debugPrint('ALDownloader | batch | download succeeded\n');
}, failedHandler: () {
debugPrint('ALDownloader | batch | download failed\n');
}, pausedHandler: () {
debugPrint('ALDownloader | batch | download paused\n');
}),
urls);
final status = await ALDownloaderBatcher.getStatusForUrls(urls);
final tasks = await ALDownloaderBatcher.getTasksForUrls(urls);
final physicalFilePath =
await ALDownloaderFileManager.getPhysicalFilePathForUrl(url);
debugPrint(
'ALDownloader | get physical file path for [url], url = $url, path = $physicalFilePath\n');
1. If the persistent file was removed by exceptional means, such as the cache folder being deleted by some business code, call [remove] and then call [download] to re-download for fixing the problem.
Welcome contribution!
Welcome to open issue or PR for any problem, suggestion and idea!
Maintainer: jackleemeta (jackleemeta@outlook.com)
निर्भरता सूची 9 आइटम
{"sdk":"flutter"}^3.0.1^3.0.1>=1.10.2 <=1.11.1^1.8.0^2.0.9^3.1.0+2^4.1.0{"sdk":"flutter"}उपयोग के अनुसार छाँटें, गतिविधि की तुलना करें और अपनाने से पहले मूल प्रोजेक्ट की आवश्यकताएँ जाँचें।
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗