Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
HaoliangHsiao opened this issue Dec 20, 2018 · 2 comments
Closed

Comments

@HaoliangHsiao
Copy link

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

luigi-rosso added a commit that referenced this issue Dec 21, 2018
@luigi-rosso
Copy link
Contributor

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

@HaoliangHsiao
Copy link
Author

Hi, The issue fixed on 1.0.5, Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants