-
Notifications
You must be signed in to change notification settings - Fork 226
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
In Rive 0.14.0, I want to get updates about state changes happening in my state machine, but the event listener is never called, although it is obvious that a state change happened in the state machine.
I tried it also in the data-binding example from the official rive examples, but the event listener is never called.
The example I tried is: https://github.com/rive-app/rive-flutter/blob/master/example/lib/examples/databinding.dart
Future<void> _init() async {
file = await File.asset(
'assets/rewards.riv',
riveFactory: RiveExampleApp.getCurrentFactory,
);
controller = RiveWidgetController(file!);
// --- I added this ---
controller?.stateMachine.addEventListener(
(event) {
debugPrint('STATE MACHINE EVENT: $event');
},
);
_initViewModel();
setState(() {});
}Steps To Reproduce
Steps to reproduce the behavior:
- Clone the rive repository https://github.com/rive-app/rive-flutter
- Run
example/project - Open e.g. the
databinding.dartfile - Add a state machine event listener (like above) with some print statement
- Run the app and open the respective page in the app
- See that the event listener is never called
Source .riv/.rev file
You can find the .riv files in the examples project's assets/
Expected behavior
The event listener of the state machine should obviously be called for happening events.
Device & Versions (please complete the following information)
- Device: Android Emulator
- OS: Android SDK API Level 34
- Flutter Version: Copy-paste the output of
flutter --version:
Flutter 3.38.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision f6ff1529fd (10 days ago) • 2025-12-11 11:50:07 -0500
Engine • hash c108a94d7a8273e112339e6c6833daa06e723a54 (revision 1527ae0ec5) (9 days ago) •
2025-12-11 15:04:31.000Z
Tools • Dart 3.10.4 • DevTools 2.51.1
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working