-
Notifications
You must be signed in to change notification settings - Fork 477
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
Functionality of the advance method in Flare controller #217
Comments
Hi @jcairo! That does seem strange. Can you post the matching .flr file? If it's private, could you email it to me at [email protected]? I'll follow up here with findings! |
Hey @luigi-rosso! Thanks for the quick reply. File and link attached. |
I see what happened! You're inheriting from FlareController with the implements keyword which requires you to implement everything yourself (including the Easy fix is to change it to a mixin and remove the ValueNotifier in your code: Change definition to mixin: class _SubUnsubButtonState extends State<SubUnsubButton>
with TickerProviderStateMixin, FlareController { Delete this: @override
ValueNotifier<bool> isActive; |
Hey @luigi-rosso! That was it! Works perfect. When I return false from the advance function it appears its never called again. Is there a way to get the advance function to rerun again after false is returned? Is it bad practise to always return true? Thanks again for the help. Much appreciated. |
Great! Yes, you can reactivate the controller by setting isActive.value = true. |
Perfect! |
Hi guys. Thanks for the great tool.
I'm working on a Flutter animation that requires a portion of the animation to be replayed while a network request is made. From my understanding this requires a custom controller.
I'm trying to create a basic custom controller to get started but I'm having issues with the advance method.
It seems as though although I always return true from the method, its only called for the first render of the widget its contained in. Any idea why this would be?
The text was updated successfully, but these errors were encountered: