पैकेज, रिपॉज़िटरी और ऐप श्रेणियाँ खोजें

पैकेज विवरणv1.8.4

al_downloader

एक URL-आधारित Flutter डाउनलोडर जो किसी भी प्रकार के फ़ाइल को डाउनलोड करने के समर्थन करता है और बहुत सारी चीजों को स्वचालित रूप से प्रबंधित करता है।

AndroidiOS
30-दिन डाउनलोड
333
लाइक
104
Pub अंक
120

पैकेज इंस्टॉल करें

flutter pub add al_downloader

पैकेज अवलोकन

सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।

al_downloader एक Flutter पैकेज है जो Android और iOS प्लेटफॉर्म पर URL-आधारित फ़ाइल डाउनलोड की अनुमति देता है। यह किसी भी फ़ाइल प्रकार को डाउनलोड करने का समर्थन करता है और डाउनलोड कतार प्रबंधित करने, प्रगति का अनुसरण करने और स्टोरेज की अनुमति प्रबंधित करने जैसे सामान्य कार्यों को स्वचालित रूप से संभालता है। इस पैकेज के कारण Flutter ऐप में विश्वसनीय डाउनलोड कार्यक्षमता के लिए बनाना आसान हो जाता है, जो विश्वसनीय बैकग्राउंड डाउनलोड की आवश्यकता वाले ऐप्स के लिए आदर्श है। pub add के माध्यम से न्यूनतम सेटअप के साथ, डेवलपर्स आसानी से शक्तिशाली डाउनलोड क्षमता को एकीकृत कर सकते हैं।

उपयोग

  • URL से फ़ाइलें डाउनलोड करना
  • बैकग्राउंड फ़ाइल डाउनलोड्स
  • बड़े फ़ाइल ट्रांसफर का प्रबंधन
  • डाउनलोड प्रगति का प्रबंधन
  • स्वचालित डाउनलोड कतार प्रबंधन

मुख्य विशेषताएँ

  • सभी फ़ाइल प्रकारों का समर्थन करता है
  • स्वचालित डाउनलोड प्रबंधन
  • क्रॉस-प्लेटफॉर्म (Android और iOS)
  • प्रगति ट्रैकिंग
  • बैकग्राउंड डाउनलोड समर्थन

इनके लिए उपयुक्त

  • फ़ाइल डाउनलोड की आवश्यकता वाले ऐप्स
  • मीडिया सामग्री डिलीवरी
  • ऑफलाइन डेटा कैशिंग
  • शैक्षिक या उत्पादकता ऐप
  • बड़े संपत्ति लाइब्रेरी वाले एप्लिकेशन

विचार योग्य बातें

  • Android पर इंटरनेट की अनुमति की आवश्यकता है
  • iOS पर बैकग्राउंड एक्सीक्यूशन की अनुमति की आवश्यकता हो सकती है
  • बड़े फ़ाइलों के लिए सावधानीपूर्वक मेमोरी प्रबंधन की आवश्यकता होती है
  • फ़ाइल पथ हैंडलिंग प्लेटफ़ॉर्म के अनुसार भिन्न हो सकती है
  • कोई निर्मित बहाली क्षमता का उल्लेख नहीं किया गया

मूल README

संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।

al_downloader

pub package

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.

Features

  • manage download tasks by url
  • simple download status
  • I/O infrequently
  • provide convenient download handle
  • support batch download
  • manage automatically files without requiring to be specified a download path
  • based on flutter_downloader

Integration

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';

Usage

ALDownloader
Initialize
ALDownloader.initialize();
Configure print
ALDownloader.configurePrint(true, frequentEnabled: false);
Download
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');
    }));
Add a handler interface
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);
Add a forever handler interface
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);
Remove handler interface
ALDownloader.removeHandlerInterfaceForUrl(url);
Pause download
/// Stop download, but the incomplete data will not be deleted.
ALDownloader.pause(url);
Cancel download
/// Stop download, and the incomplete data will be deleted.
ALDownloader.cancel(url);
Remove download
/// Remove download, and all the data will be deleted.
ALDownloader.remove(url);
Get download status
final status = await ALDownloader.getStatusForUrl(url);
Get download progress
final progress = await ALDownloader.getProgressForUrl(url);
Get task
final task = await ALDownloader.getTaskForUrl(url);
Get all tasks
final tasks = await ALDownloader.tasks;
ALDownloaderBatcher
Batch download
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');
    }));
Add a handler interface for batch
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);
Get download status for a set of urls
final status = await ALDownloaderBatcher.getStatusForUrls(urls);
Get tasks
final tasks = await ALDownloaderBatcher.getTasksForUrls(urls);
ALDownloaderFileManager - A manager that manages file by url
final physicalFilePath =
    await ALDownloaderFileManager.getPhysicalFilePathForUrl(url);
debugPrint(
    'ALDownloader | get physical file path for [url], url = $url, path = $physicalFilePath\n');

Note:

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.

Key File Of Example

iOS
Android

Contributing

Welcome contribution!

Welcome to open issue or PR for any problem, suggestion and idea!

Maintainer: jackleemeta (jackleemeta@outlook.com)

श्रेणियाँ

निर्भरताएँ

निर्भरता सूची 7 आइटम

सोर्स रिपॉज़िटरी

इस पैकेज का उपयोग करने वाले प्रोजेक्ट

अभी कोई डेटा उपलब्ध नहीं है।