-
Notifications
You must be signed in to change notification settings - Fork 222
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Description
An event listener added using addEventListener is being called from within a paint loop. I have a button in a rive file which triggers an event. I then have code listening to this. It is failing because the event occurs within the paint loop so I cannot setState
Steps To Reproduce
void _onAnimationInit(Artboard artboard) {
StateMachineController controller = StateMachineController.fromArtboard(artboard, "Default", onStateChange: _onAnimationStateChange)!;
artboard.addController(controller);
_controller.addEventListener(_onAnimationEvent);
}
Expected behavior
Event listeners should only be called outside the paint loop
Screenshots
Device & Versions (please complete the following information)
- Device: Android phone
Flutter 3.24.4 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 603104015d (8 days ago) • 2024-10-24 08:01:25 -0700
Engine • revision db49896cf2
Tools • Dart 3.5.4 • DevTools 2.37.3
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
