How can I make a lottie animation display each time I click on a button(container)? I have a page with a stack widget and some other widgets inside it. I'm trying to make a lottie animation conditionaly visible each time the user click on a container.
I tried creating a page state variable "animationshown" as boolean. Set it to false default. On my hide show Lottie animation, I turned on conditional visibility, added the variable. Then in an action on my container, I made it set the value to true. but the animation was shown only the first time I click the button. maybe it needs to reset to its default value (false) after the animation finishes.