Closed jkurtw closed 4 years ago
We've added support for this in flare_flutter: ^1.7.0
.
In order to use this you'll need to mark the image you want to swap as dynamic in Flare. The gist below has a full example for how to do this using a custom controller. https://gist.github.com/luigi-rosso/c50277341bd2681be072a575acbeb1fc#file-dynamic_image_swapping-dart-L60
Awesome! Thank you.
Np! Note that we were testing this on master. I’m getting some reports of errors, there may be some breaking change on other channels..
Sounds good
I'm backing out the changeImageFromNetwork(String url) method until some breaking changes in dev/master land all the way in stable. I'll make it available as a utility function in a gist for anyone who wants to use it.
Note that you'll still be able to call changeImage(Image image) and acquire that image from the network with the utility function above.
flare_flutter: 1.7.1
is up without changeImageFromNetwork.
Here's the changeImageFromNetwork implemented as an extension method for dev/stable: https://gist.github.com/luigi-rosso/c50277341bd2681be072a575acbeb1fc#file-dynamic_image_swapping-dart-L100
Can we close this @jkurtw?
LGTM!
We want to generate an image at run time, and then use it in an animation.
With Lottie, we can run time compose the image, then drop it into the Lottie animation. Another example is to just populate it with images that are downloaded from the network.
Is this possible?
It looks like this might be the same question as https://github.com/2d-inc/Flare-Flutter/issues/63