image_downloader_web 1.0.2 copy "image_downloader_web: ^1.0.2" to clipboard
image_downloader_web: ^1.0.2 copied to clipboard

A Flutter plugin for downloading images from URL to user's device. This plugin only works for Flutter web.

Image downloader for web #

Download images from URL on Flutter Web

Download image on webb #


final WebImageDownloader _webImageDownloader = WebImageDownloader();
const _url = "https://picsum.photos/200";

Future<void> _downloadImage() async {
  await _webImageDownloader.downloadImageFromWeb(_url);
}

Download image on web from UInt8List #


final WebImageDownloader _webImageDownloader = WebImageDownloader();
final uint8List = Uint8List();

Future<void> _downloadImage() async {
  await _webImageDownloader.downloadImageFromUInt8List(uInt8List: uint8List);
}

Download image with reduced quality #


final WebImageDownloader _webImageDownloader = WebImageDownloader();
const _url = "https://picsum.photos/200";

Future<void> _downloadImage() async {
  await _webImageDownloader.downloadImageFromWeb(_url, imageQuality: 0.5);
}

Download image with custom headers #


final WebImageDownloader _webImageDownloader = WebImageDownloader();
const _url = "https://picsum.photos/200";

Future<void> _downloadImage() async {
  final Map<String, String> headers = {
    'authorization': token,
  };
  await _webImageDownloader.downloadImageFromWeb(_url, headers: headers);
}
41
likes
130
pub points
95%
popularity

Publisher

unverified uploader

A Flutter plugin for downloading images from URL to user's device. This plugin only works for Flutter web.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, http, universal_html

More

Packages that depend on image_downloader_web