asset_cache 0.1.4 copy "asset_cache: ^0.1.4" to clipboard
asset_cache: ^0.1.4 copied to clipboard

outdated

generic asset cache with implementations for image, json and strings

asset_cache #

A flutter package for loading and cache assets in memory.

asset_cache can load any types; just inherit from AssetCache<T> and give it a decoder which decodes a ByteData into the correct type T.

The library comes with implementations for loading images, json and strings, using the following singletons:

  • ImageAssets
  • ImageAsUint8List
  • StringAssets
  • JsonAssets

You can set the AssetCache.basePath to avoid using full paths for assets.

Remember to add assets in pubspec.yaml, like:

  assets:
     - assets/images/
     - assets/json/

Also, see test and example.

Based on CachingAssetBundle.

41
likes
0
pub points
88%
popularity

Publisher

verified publisherapptakk.com

generic asset cache with implementations for image, json and strings

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on asset_cache