In Flutter, add the EggPlayer widget with the .egg bytes and the state machine name; onLoaded gives you the EggRuntime to set inputs (setBool, setNumber, fire) and view model properties, and onEvent receives the file's events. EggFit.expand fills phones and tablets alike for games.
- Platform
- Flutter apps
- Binding
- Dart packages egg_runtime and egg_player
- Draws with
- ui.Image from the native runtime
- Same file everywhere
- One .egg plays the same on every runtime
- License
- MIT or Apache-2.0
The widget
EggPlayer(
bytes: bytes, // Uint8List of the .egg
stateMachine: 'rings',
fit: EggFit.expand,
onLoaded: (runtime) {
runtime.setNumber('move', 0.6);
},
onEvent: (event) => debugPrint('$event'),
)Last checked against the product on 2026-10-15.



