Cache Network Image Provider Flutter Code Example


Example: flutter cached network image not working

Worked for me after searching all over the sites :=>  1. Install the latest dependency for cached_network_image: 2. Stop and Restart the app if you are debugging or running  If not goahead with other steps:  3. Flutter clean 4. Quite from IDE 5. Reopen your IDE and run pub get  Example:  CachedNetworkImage(    imageUrl: 'https://picsum.photos/250?image=9',    fit: BoxFit.cover,    width: MediaQuery.of(context).size.width,    placeholder: (context,url) => CircularProgressIndicator(),    errorWidget: (context,url,error) => new Icon(Icons.error),  )   ###### OR ######  Image(image: CachedNetworkImageProvider('https://picsum.photos/250?image=9'))

Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable