2d-inc/Flare-Flutter

Animation not work when you set isPaused value from true to flase

HaoliangHsiao opened this issue · 2 comments

FlareActor(
"assets/Penguin.flr",
alignment: Alignment.center,
fit: BoxFit.cover,
animation: "walk",
isPaused: _isPaused,
)
Step :

  1. set _isPaused = false
  2. set _isPaused = true
  3. set _isPaused = false

The Animation not running

Reason:
The method updatePlayState() In FlareActorRenderObject
_frameCallbackID must set null after cancelFrameCallbackWithId

  if (_frameCallbackID != null) {
    SchedulerBinding.instance.cancelFrameCallbackWithId(_frameCallbackID);
    _frameCallbackID = null; // reset _frameCallbackID 
  }

The _frameCallbackID will be recreate when isPaused = false
Please Help to fixed it, Thank you

Thanks for reporting this, please try it out with the latest version!

Hi, The issue fixed on 1.0.5, Thanks