eticon_downloader 1.0.4 copy "eticon_downloader: ^1.0.4" to clipboard
eticon_downloader: ^1.0.4 copied to clipboard

Flutter plugin to download file in download directory

English

ETICON DOWNLOADER #

Library for downloading images/videos or files to external storage. Images/videos are saved in Android Gallery and iOS Photos. Files are saved in Downloads on Android and IOS.

Installation in a project #

Add eticon_downloader: 0.1.2 to dev_dependencies pubspec.yaml as shown below:

dev_dependencies:
  flutter_test:
    sdk: flutter
  flutter_lints: ^1.0.0
  eticon_downloader: ^1.0.0

iOS #

Add the following permissions to Info.plist file:

  • NSPhotoLibraryUsageDescription - For permission to save photos/videos in IOS Photos.
  • NSDocumentDirectory - For permission to save files in Downloads.

Android #

Add the following permissions to AndroidManifest.xml file:

  • android.permission.WRITE_EXTERNAL_STORAGE - For permission to use external storage.

Using #

Method downloadFile #

import 'package:eticon_downloader/eticon_downloader.dart';

String URL_FILE = 'https://filesamples.com/samples/document/pdf/sample1.pdf';

TextButton(
  child: Text("Download file"),
    onPressed: () async {
      await EticonDownloader.downloadFile(url: URL_FILE);
    }
)

Method downloadMedia #

String URL_IMAGE = 'https://filesamples.com/samples/image/png/sample_640%C3%97426.png';
TextButton(
  child: Text("Download image"),
    onPressed: () async {
      await EticonDownloader.downloadMedia(url: URL_IMAGE);
    }
)
String URL_VIDEO = 'https://filesamples.com/samples/video/mp4/sample_960x540.mp4';
TextButton(
  child: Text("Download video"),
    onPressed: () async {
      await EticonDownloader.downloadMedia(url: URL_VIDEO);
    }
)
0
likes
90
pub points
59%
popularity

Publisher

unverified uploader

Flutter plugin to download file in download directory

Documentation

API reference

License

MIT (LICENSE)

Dependencies

android_path_provider, device_info_plus, flutter, gallery_saver, http, mime_type, path, path_provider, permission_handler

More

Packages that depend on eticon_downloader