dloader 1.2.5 copy "dloader: ^1.2.5" to clipboard
dloader: ^1.2.5 copied to clipboard

A simple and versatile library for downloading files with support for adapters including dio, curl, wget, powershell, aria2 and axel. Feel free to create new adapters.

example/dloader_example.dart

import 'dart:io';
import 'package:dloader/dloader.dart';

void main() {
  final dloader = Dloader(DioAdapter());

  final url = 'https://example.com/file.zip';
  final destination = File('/home/helio/file.zip');

  dloader
      .download(
          url: url,
          destination: destination,
          onProgress: (progress) {
            print('Percent complete: ${progress['percentComplete']}%');
          })
      .then((File file) {
    print('File downloaded to: ${file.path}');
  }).catchError((e) {
    print('Error downloading file: $e');
  });
}
4
likes
40
pub points
0%
popularity

Publisher

verified publisherhelio.me

A simple and versatile library for downloading files with support for adapters including dio, curl, wget, powershell, aria2 and axel. Feel free to create new adapters.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (LICENSE)

Dependencies

dio, executable, path

More

Packages that depend on dloader