image property

(Image? Function(LottieComposition, LottieImageAsset)?) image
final

A callback to dynamically change an image of the animation.

Example:

Lottie.asset(

Implementation

//   'assets/data.json',
//   delegates: LottieDelegates(
//     image: (composition, image) {
//       if (image.id == 'img_0' && _isMouseOver) {
//         return myCustomImage;
//       }
//
//       // Use the default method: composition.images[image.id].loadedImage;
//       return null;
//     },
//   )
// )
/// ```
final ui.Image? Function(LottieComposition, LottieImageAsset)? image;