get_image_cache_network 0.0.3 get_image_cache_network: ^0.0.3 copied to clipboard
Get image from the cache if exist or from network. In case of error show your placeholder, this package use Dio and Hive.
Get Image Cache Network #
This package provides a configurable widget to display an image from the network or from the cache, it also provides an error widget in case of failures.
Features #
Usage #
GetImageCacheNetwork(
imageFromNetworkUrl: _imageUrl, // Image from the network
imageFromAssetsUrl: 'assets/placeholder.png', // Image for your placeholder image
width: MediaQuery.of(context).size.width * 0.8, // Optional width by default 64
height: MediaQuery.of(context).size.width * 0.5, // Optional height by default 64
cacheDuration: 10 // Optional duration of the file in cache 15 days by default
loading: const CircularProgressIndicator(color: Colors.blue), // Optional widget to do loading by default progress indicator with green color
)
Additional information #
This package use dio to manage request and use hive to storage cache.