flutter_advanced_networkimage 0.2.4 copy "flutter_advanced_networkimage: ^0.2.4" to clipboard
flutter_advanced_networkimage: ^0.2.4 copied to clipboard

discontinued
outdatedDart 1 only

An advanced image provider for flutter.

Flutter Advanced Network Imageprovider #

pub package

An advanced image provider provides caching and retrying for flutter app. Now with zoomable widget and transition to image widget.

Getting Started #

Installation #

Add this to your pubspec.yaml (or create it):

dependencies:
  flutter_advanced_networkimage: any

Then run the flutter tooling:

flutter packages get

Example #

// using image provider
new Image(
  image: new AdvancedNetworkImage(url, header: header, useDiskCache: true),
  fit: BoxFit.cover,
)
// get the disk cache folder size
int folderSize = await getDiskCachedImagesSize();
// clean the disk cache
bool isSucceed = await clearDiskCachedImages();
// using zooming widget & transitiontoimage widget
new ZoomableWidget(
  minScale: 0.3,
  maxScale: 2.0,
  child: new Container(
    child: new TransitionToImage(
      new AdvancedNetworkImage(url),
      // This is the default placeholder widget at loading status,
      // you can write your own widget with CustomPainter.
      placeholder: new CircularProgressIndicator(),
      // This is default duration
      duration: new Duration(milliseconds: 300),
      fallbackWidget: new DecoratedBox(...),
    ),
  ),
)
// using reload feature(you can use a `GestureDetector`
// widget to wrap `TransitionToImage` widget)
TransitionToImage imageWidget = new TransitionToImage(
  new AdvancedNetworkImage(url),
  useReload: true,
  reloadWidget: new Icon(Icons.replay),
);
new ZoomableWidget(
  minScale: 0.3,
  maxScale: 2.0,
  child: imageWidget,
  tapCallback: imageWidget.reloadImage,
),

Details in example/ folder.

demo gif

Q&A #

  • Q: Why the cached files stored in documents directory instead of temporary directory?
    A: I think your cached files should be a part of your app, and you can manual clear your cached files.
122
likes
0
pub points
86%
popularity

Publisher

unverified uploader

An advanced image provider for flutter.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

crypto, flutter, http, path, path_provider, quiver

More

Packages that depend on flutter_advanced_networkimage