Skip to content

alcampospalacios/get_image_cache_network

Repository files navigation

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

get_image_cache_network

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
            errorWidth: MediaQuery.of(context).size.width * 0.8, // Optional width by error widget
            errorHeight: MediaQuery.of(context).size.width * 0.5, // Optional height by error widget
            showLogs: true, // Optional setting to show or hide log of request
            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.

About

Flutter package to get an image from internet or from cache.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published