websafe_network_image 1.0.5

Flutter Android iOS web

Simple abstraction to be able to detect Web, Android, and iOS without a hard reference to `dart:io`

websafe_network_image #

Dart Publisher

A Flutter compatible library to handle cached network images for Android, iOS while falling back to the built in image for Web. As far as possible, this is designed to be a drop-in replacement for the CachedNetworkImage package.

For web where there is headers involved, this will bypass Flutter's (and the browser's) built in cache and attempty to load the images directly using the http package. This is because the current NetworkImage does not support headers because it uses the built in browser implementation.

Using the library #

Add the repo to your Flutter pubspec.yaml file.

dependencies:
  websafe_network_image: <<version>> 

Then run...

flutter packages get

Example #

import 'package:websafe_network_image/websafe_network_image.dart';

...
Widget build(BuildContext context) {
  return WebsafeNetworkImage(
    imageUrl: imageUrl,
    ...
  );
}
0
likes
90
pub points
63%
popularity

Publisher

peifferinnovations.com

Simple abstraction to be able to detect Web, Android, and iOS without a hard reference to `dart:io`

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

cached_network_image, flutter, http, meta

More

Packages that depend on websafe_network_image