flutter_advanced_networkimage 0.2.0

  • README.md
  • Example
  • Installing
  • Versions
  • new75

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


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

  flutter_advanced_networkimage: any

Then run the flutter tooling:

flutter packages get


// using image provider
new Image(
  image: new AdvancedNetworkImage(url, header: header, useDiskCache: true),
  fit: BoxFit.cover,
// get the disk cache folder size
bool isSucceed = await getDiskCachedImagesSize();
// clean the disk cache
int folderSize = await clearDiskCachedImages();
// using zooming widget & transitiontoimage widget
new ZoomableWidget(
  minScale: 0.3,
  maxScale: 2.0,
  child: new Container(
    child: new TranstionToImage(
      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),

Details in example/ folder.


  • Q: Why the cached files stored in documents directory instead of temporary directory?
    A: I think your cached fils should be a part of your app, and you can manual clear your cached files.



  • Add timeoutDuration parameter, make some tweaks and add some doc comments to AdvancedNetworkImage imageprovider.

  • Make some tweaks for TransitionToImage widget.

  • Fix the panning issue which would shift when the scale is not 1.0 for ZoomableWidget.


  • Catch exception for file not found.


  • Add default blendmode to TransitionToImage widget.


  • Fix the listener leak problem for the TransitionToImage widget.


  • Add a TransitionToImage Widget, optimize ZoomableWidget and update example.


  • Downgrade http version.


  • Upgrade the dart SDK version.


  • Add animation to ZoomableWidget.


  • Update ZoomableWidget.


  • Update example.


  • Fix dependencies with http package.


  • Upgrade some dependencies version.


  • Downgrade some packages version.


  • An advanced image provider and a widget with zooming and panning.


import 'package:flutter/material.dart';
import '../../lib/flutter_advanced_networkimage.dart';
import '../../lib/zoomable_widget.dart';
import '../../lib/transition_to_image.dart';

void main() => runApp(new MyApp());

class MyApp extends StatelessWidget {
  Widget build(BuildContext context) {
    return new MaterialApp(
      title: 'Flutter Example',
      theme: new ThemeData(
        primarySwatch: Colors.blue,
      home: new DefaultTabController(
        length: 2,
        child: new Scaffold(
          appBar: new AppBar(
            title: const Text('Flutter Advanced Network Image Example'),
          body: new ZoomableWidget(
            minScale: 0.3,
            maxScale: 2.0,
            child: new TransitionToImage(
              new AdvancedNetworkImage(

1. Depend on it

Add this to your package's pubspec.yaml file:

  flutter_advanced_networkimage: "^0.2.0"

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

Alternatively, your editor might support pub get or packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:flutter_advanced_networkimage/flutter_advanced_networkimage.dart';
Version Uploaded Documentation Archive
0.2.0 Feb 16, 2018 Go to the documentation of flutter_advanced_networkimage 0.2.0 Download flutter_advanced_networkimage 0.2.0 archive
0.1.10 Feb 15, 2018 Go to the documentation of flutter_advanced_networkimage 0.1.10 Download flutter_advanced_networkimage 0.1.10 archive
0.1.9 Feb 14, 2018 Go to the documentation of flutter_advanced_networkimage 0.1.9 Download flutter_advanced_networkimage 0.1.9 archive
0.1.8 Feb 13, 2018 Go to the documentation of flutter_advanced_networkimage 0.1.8 Download flutter_advanced_networkimage 0.1.8 archive
0.1.7 Feb 12, 2018 Go to the documentation of flutter_advanced_networkimage 0.1.7 Download flutter_advanced_networkimage 0.1.7 archive
0.1.6+2 Feb 10, 2018 Go to the documentation of flutter_advanced_networkimage 0.1.6+2 Download flutter_advanced_networkimage 0.1.6+2 archive
0.1.6+1 Feb 10, 2018 Go to the documentation of flutter_advanced_networkimage 0.1.6+1 Download flutter_advanced_networkimage 0.1.6+1 archive
0.1.6 Feb 10, 2018 Go to the documentation of flutter_advanced_networkimage 0.1.6 Download flutter_advanced_networkimage 0.1.6 archive
0.1.5 Feb 9, 2018 Go to the documentation of flutter_advanced_networkimage 0.1.5 Download flutter_advanced_networkimage 0.1.5 archive
0.1.4 Jan 29, 2018 Go to the documentation of flutter_advanced_networkimage 0.1.4 Download flutter_advanced_networkimage 0.1.4 archive

All 14 versions...


This feature is new.
We welcome feedback.
More details: scoring.

We analyzed this package, and provided a score, details, and suggestions below.

  • tool failures on Feb 16, 2018
  • Dart: 2.0.0-dev.20.0
  • pana: 0.10.1
  • Flutter: 0.0.22


Describes how popular the package is relative to other packages. [more]
60 / 100
Code health derived from static analysis. [more]
100 / 100
Reflects how tidy and up-to-date the package is. [more]
76 / 100
Overall score:
Weighted score of the above. [more]


Detected platforms: unsure

Error(s) prevent platform classification.


  • Fix dependencies in pubspec.yaml.

    Running flutter packages pub upgrade failed with the following output:

    ERR: Invalid argument(s): Minimum version ("2.0.0-dev.23.0") must be less than maximum ("2.0.0-dev.16.0").
    ERR: package:pub_semver/src/version_range.dart 59         new VersionRange
     package:pub/src/pubspec.dart 366                     Pubspec._ensureEnvironment
     package:pub/src/pubspec.dart 331                     Pubspec.dartSdkConstraint
     package:pub/src/solver/backtracking_solver.dart 511  BacktrackingSolver._checkPubspecMatchesSdkConstraint
     package:pub/src/solver/backtracking_solver.dart 474  BacktrackingSolver._checkVersion
     ===== asynchronous gap ===========================
     package:pub/src/solver/backtracking_solver.dart 432  BacktrackingSolver._findValidVersion.<fn>
     ===== asynchronous gap ===========================
     dart:async                                           Future.doWhile
     package:pub/src/solver/backtracking_solver.dart 430  BacktrackingSolver._findValidVersion
     package:pub/src/solver/backtracking_solver.dart 337  BacktrackingSolver._versionQueueFor
     ===== asynchronous gap ===========================
     package:pub/src/solver/backtracking_solver.dart 290  BacktrackingSolver._solve.<fn>
     ===== asynchronous gap ===========================
     dart:async                                           _completeOnAsyncReturn
     package:pub/src/solver/backtracking_solver.dart 315  BacktrackingSolver._solve.<fn>
     dart:async                                           _completeOnAsyncReturn
     package:pub/src/solver/version_selection.dart 64     VersionSelection.select
     dart:async                                           _completeOnAsyncReturn
     package:pub/src/solver/version_selection.dart 91     VersionSelection._addDependencies
    ERR: This is an unexpected error. Please run
         pub --trace upgrade --verbosity io --no-precompile
     and include the logs in an issue on https://github.com/dart-lang/pub/issues/new
  • Fix platform conflicts.

    Make sure none of the libraries use mutually exclusive dependendencies.

  • Fix issues reported by dartanalyzer.

    dartanalyzer reported 1 error(s) and 0 warning(s).

  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.8.0 <2.0.0