Cached Network Image In Flutter

Cached Network Image In Flutter :

Cached Network Image In Flutter
dependencies:
cached_network_image:

Widget _sizedContainer(Widget child, Color color) {
  return new SizedBox(
    height: 150.0,
    child: new Container(
      child: new Center(child: child),
      color: color,
    ),
  );
}


       _sizedContainer(
                new CachedNetworkImage(
                  placeholder: (BuildContext context, String url) {
                    return CircularProgressIndicator();
                  },
                  imageUrl: 'image url',
                  errorWidget:
                      (BuildContext context, String url, Object error) {
                    return Icon(Icons.error);
                  },
                ),
                Colors.green),

The flutter tutorial  is a website that bring you the latest and amazing resources of code. All the languages codes are included in this website. The languages like flutter, android, java,kotlin etc.with the help of this languages any user can develop the beautiful application

For more information about Flutter. visit www.fluttertutorial.in