xvrh / lottie-flutter

Render After Effects animations natively on Flutter. This package is a pure Dart implementation of a Lottie player.
https://pub.dev/packages/lottie
MIT License
1.16k stars 196 forks source link

ImageProvider for DecorationImage #225

Open cekrozl1 opened 2 years ago

cekrozl1 commented 2 years ago

Hi !

I've been playing with the package a lot I love it.

I'm trying to simplify my implementation by using Container's decoration -> BoxDecoration -> DecorationImage as explained here : https://api.flutter.dev/flutter/painting/BoxDecoration-class.html

I can see that there's an ImageProviderFactory in the lottie package but I don't know what to do to return it - every attempt I made get null returned.

So my question is : is there a way to return a valid, non null, ImageProvider for a Lottie animation so it can be used as the image parameter for a DecorationImage?

Thank you !