RafaelBarbosatec / gif_view

Load GIF images and can set framerate
MIT License
15 stars 18 forks source link

Pausing the animation on a particular frame? #9

Closed YohanWadia closed 1 year ago

YohanWadia commented 1 year ago

Hi! This is a great package, however I have 2 questions.

  1. I have managed to find out the current frame on a button click... but what I need is when the button is clicked the animation is paused at that frame(not reset)....How may I pause the animation on a button click?
  2. And for some reason your Asset animation works... but all the network animations dont?!? For eg. the spinner keeps spinning but nothing appears.

Thanks , will eagerly await your reply, YO

RafaelBarbosatec commented 1 year ago

Hi @YohanWadia ! Thanks so much ! So, about the first question it’s not possible yet, but i can adds a controller to available this function. About de second question, you already check the internet permission? I don’t can reproduce this problem in the moment.

YohanWadia commented 1 year ago

I actually managed to do it by calling a setState on a boolean that i supplied to isAnimated

But in doing so I noticed even after I had done a set state on the isAnimated boolean... the onFrame: (value){} call back still fired once or twice. That was hard to explain cause if the animation had been stopped how is their still a few frames getting executed, post that command.

RafaelBarbosatec commented 1 year ago

Available in 0.3.0 version