Flutter interactive animation with exodeui_flutter
For Flutter interactive animation designed outside your code, add the exodeui_flutter package, load a .bexode scene and render it with the ExodeUICanvas widget. An ExodeUICanvasController sets inputs, fires triggers and reads values from Dart. The package renders through a WebView bridge, so for motion written in Dart, Flutter's built-in implicit animations or flutter_animate fit better, and Rive has a mature native Flutter runtime.
Flutter Runtime · Updated November 2026
flutter pub add exodeui_flutterGetting Started
The exodeui_flutter package embeds the ExodeUI interactive motion engine into Flutter apps across iOS, Android, and macOS. It supports binary .bexode scenes, JSON artboards, state machine inputs, physics interactions, and widget-tree image capture.
.bexode binariesInstallation & pubspec.yaml
Add the latest release to your Flutter project dependencies:
flutter pub add exodeui_flutterOr declare it manually inside your pubspec.yaml along with your scene assets:
dependencies:
flutter:
sdk: flutter
exodeui_flutter: ^1.1.4
flutter:
assets:
- assets/animations/hero.bexodeBasic Usage: Rendering a .bexode Scene
Binary .bexode files package vector paths, easing curves, state machines, and images into a single compressed binary. Load the asset bytes and pass them to ExodeUICanvas:
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:exodeui_flutter/exodeui_flutter.dart';
class HeroAnimationScreen extends StatefulWidget {
const HeroAnimationScreen({super.key});
@override
State<HeroAnimationScreen> createState() => _HeroAnimationScreenState();
}
class _HeroAnimationScreenState extends State<HeroAnimationScreen> {
Uint8List? _bexodeBytes;
late final ExodeUICanvasController _controller;
@override
void initState() {
super.initState();
_controller = ExodeUICanvasController();
_loadBexode();
}
Future<void> _loadBexode() async {
final byteData = await rootBundle.load('assets/animations/hero.bexode');
setState(() {
_bexodeBytes = byteData.buffer.asUint8List();
});
}
@override
void dispose() {
_controller.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
if (_bexodeBytes == null) {
return const Center(child: CircularProgressIndicator());
}
return Scaffold(
body: Center(
child: SizedBox(
width: 380,
height: 380,
child: ExodeUICanvas(
bexodeBytes: _bexodeBytes,
controller: _controller,
fit: ExodeFit.contain,
alignment: ExodeAlignment.center,
onReady: () {
print('ExodeUI Runtime ready!');
_controller.setInputBool('isHovered', true);
},
onTrigger: (triggerName, animName) {
print('Trigger fired: $triggerName in $animName');
},
onInputUpdate: (name, value) {
print('State variable updated: $name = $value');
},
),
),
),
);
}
}ExodeUICanvasController API
The ExodeUICanvasController provides complete bidirectional control over the animation and physics state machine:
| Method | Arguments | Description |
|---|---|---|
| play() | none | Resumes timeline animation and physics simulation. |
| pause() | none | Pauses animation playback. |
| seek(seconds) | double seconds | Jumps the playhead to an exact timestamp. |
| setLayout(fit, align) | ExodeFit fit, ExodeAlignment alignment | Dynamically updates viewport scaling and anchor. |
| setInputBool(name, value) | String name, bool value | Sets a boolean state machine variable. |
| setInputNumber(name, value) | String name, double value | Sets a numeric state machine variable. |
| setInputString(name, value) | String name, String value | Sets a string state machine variable. |
| getInput(name) | String name | Fetches the current runtime value of any input. |
| fireTrigger(name) | String name | Fires a named transition trigger. |
| updateGraphData(id, data) | String objectId, List<num> data | Streams live data points into vector chart components. |
| captureImage() | none | Captures current canvas frame as raw PNG Uint8List bytes. |
Flutter Widget-Tree Image Capture
Because WebView rendering is separated from Flutter's native Skia/Impeller render pipeline, ExodeUI provides captureImage(). This snapshots the artboard into a native Uint8List PNG so you can paint it directly into Flutter's widget tree, shader masks, or RepaintBoundary:
// Capture snapshot of current ExodeUI frame
final Uint8List? pngBytes = await _controller.captureImage();
if (pngBytes != null) {
showDialog(
context: context,
builder: (ctx) => AlertDialog(
title: const Text('Exported Artboard Snapshot'),
content: Image.memory(pngBytes),
),
);
}Platform Setup & Network Security
Ensure your platform configuration files allow local bridge communication:
android:usesCleartextTraffic="true" on the <application> tag for local asset streaming.NSAllowsArbitraryLoadsInWebContent = true inside NSAppTransportSecurity.com.apple.security.network.client = true for WebView engine loading.Flutter interactive animation: common questions
How do I install exodeui_flutter?
Run flutter pub add exodeui_flutter, or add it to pubspec.yaml. The current release on pub.dev is 1.1.4 and needs Flutter 3.27 or newer.
Which platforms does it support?
iOS, Android and macOS. Each platform needs a small config change so the WebView can load the engine; the steps are below.
Does it render natively with Impeller?
No. The engine runs in a WebView and the package bridges it to Flutter. Use captureImage() when you need the current frame as a PNG inside the widget tree.
How do I react to the animation in Dart?
Use onTrigger and onInputUpdate on ExodeUICanvas, and call setInputBool, setInputNumber or fireTrigger on the controller.
Can an AI coding tool build the animation for me?
Yes. ExodeUI has an MCP server, so Claude Code, Cursor and other AI coding tools can create and edit .exode files from plain-language prompts. You then load the file with this runtime like any other.
What does ExodeUI cost?
The editor, CLI and MCP server need ExodeUI Professional: $6.30 a month billed yearly, or $8 month to month. New accounts get a trial. The runtime package installs from the public registry.