easy_downloader 0.0.30 copy "easy_downloader: ^0.0.30" to clipboard
easy_downloader: ^0.0.30 copied to clipboard

Easy Downloader is a simpled easy to use plugin to download files from the internet.

Fast download manager allow download in multiple isolate, file is split to multiple segments and download each segment using different connections.

Features #

  • Support resume, pause, download
  • Support queue download
  • Download with multiple connections in multiple isolate with progress
  • Support notification
  • Support open file after download (only android and ios)

easy_dowloader

Getting started #

add easy_downloader into your pubspec.yaml.

dependencies:
  easy_downloader: ^0.0.16

activate easy_downloader

dart pub global activate easy_downloader

Usage #

  1. Initialize the plugin

Flutter

add easy_downloader_flutter_lib into your pubspec.yaml.

await EasyDownloader().initFlutter(
      allowNotification: true,
      //notification icon present in android/res/drawable
      defaultIconAndroid: 'download',
  );

Dart

  EasyDownloader().init();
  1. Create new task
var url = "https://github.com/linkkader/zanime/releases/download/39/zanime_39.apk";
var name = "test10MB$i";
var path = (await getApplicationDocumentsDirectory()).path;
var task = await downloader.download(
  url: url,
  autoStart: false,
  path: path,
  maxSplit: 1,
  fileName: "${name}easyDownloader",
);
task.addListener((task) {
  //listen all task update
  setState(() {
    
    });
});
task.addSpeedListener((length) {
  //listen speed
  speedTask[task.downloadId] = length;
  setState(() {
  
  });
});
///show notification if you want(only tested on android)
task.showNotification();

Additional information #

  • only tested on android, ios, macos

  • sometime your downloaded length will exceed the total length, it is not problem, this problem occurs if your file is small

License #

Copyright (c) 2021 linkkader

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
17
likes
130
pub points
68%
popularity

Publisher

unverified uploader

Easy Downloader is a simpled easy to use plugin to download files from the internet.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (LICENSE)

Dependencies

args, chunked_stream, cli_completion, http, isar, logger, mason_logger, pub_updater

More

Packages that depend on easy_downloader