cached_network_lottie 0.0.1
cached_network_lottie: ^0.0.1 copied to clipboard
Cached network Lottie widget with image asset caching support.
cached_network_lottie #
Cached network Lottie widget that also caches referenced image assets.
Features #
- Cache Lottie JSON files via
flutter_cache_manager. - Cache image assets referenced by the Lottie composition.
- Supports custom cache managers and HTTP headers.
Getting started #
Add the dependency:
dependencies:
cached_network_lottie: ^0.0.1
Usage #
import 'package:cached_network_lottie/cached_network_lottie.dart';
CachedNetworkLottie(
'https://assets10.lottiefiles.com/packages/lf20_nfbtru7n.json',
width: 180,
height: 180,
repeat: true,
)
Custom cache manager and headers #
CachedNetworkLottie(
'https://example.com/anim.json',
cacheManager: myCacheManager,
headers: {'Authorization': 'Bearer ...'},
)
API documentation #
Generate API docs locally:
dart doc
Notes #
- This package uses Lottie internal providers to cache image assets.
- You can supply a custom
BaseCacheManageror custom headers when needed.