I'm trying to show an image placeholder while the image is being loaded from the network and replace the placeholder with an actual image with a fade-in animation. This works fine when I use a simple png image from assets. Following is the existing code:
FadeInImage(placeholder: AssetImage('assets/one.png'),
image: NetworkImage(product.imageUrl),
fit: BoxFit.cover,)
Now I want to load a flare animation as image placeholder. I'm using FlareActor to show flare animation but FlareActor is a widget and placeholder in FadeInImage needs ImageProvider. Is there any way to load flare animation as image placeholder and replace it to actual image with a fade-in animation.
Following is the code to load simple flare animation:
FlareActor("assets/images/image_placeholder.flr",
animation: "Untitled",)
Thanks