exodeui_flutter 1.1.4
exodeui_flutter: ^1.1.4 copied to clipboard
Official Flutter runtime for the ExodeUI animation engine. Renders .exode and .bexode artboards with physics, state machines, chart components and interactivity.
ExodeUI for Flutter #
The official Flutter runtime for the ExodeUI Animation Engine.
Render interactive vector animations, physics simulations, state machines, charts, and design systems natively in Flutter.
๐ Overview #
ExodeUI is the next-generation Motion Stack and Motion Development Environment (MDE). The exodeui_flutter package delivers hardware-accelerated playback for .exode and .bexode artboards directly inside your Flutter applications on Android, iOS, and macOS.
Export animations straight from the ExodeUI Editor or Figma and run them with pixel-perfect fidelity, Rapier2D physics, and zero handoff friction.
- ๐ Official Website: https://exodeui.com
- ๐ Documentation: https://exodeui.com/docs
- ๐จ Motion Marketplace & Showcase: https://exodeui.com/showcase
- ๐ฆ Pub.dev Package: https://pub.dev/packages/exodeui_flutter
โจ Features #
- ๐๏ธ Ultra-Fast Binary Loading (
.bexode): Loads in $\sim3\text{ms}$ with 5โ10ร compression compared to JSON. - โก Lightweight Render Pipeline: Sub-millisecond ($0.24\text{ms}$) frame render time; well within the 60fps / 120fps frame budgets.
- โ๏ธ Physics & Gravity Engine: Full 2D physics powered by Rapier (gravity, collision boundaries, drag, wind, and force fields).
- ๐ง Interactive State Machines: Complex conditional logic, multi-layer transitions, state variables, and event listeners.
- ๐ Dynamic Components & Charts: Live real-time updates for Line/Area Graphs, Bar Charts, Pie Charts, and Dropdowns.
- ๐ฑ Responsive Auto-Layout: Supports all 8 fit modes (
contain,cover,fill, etc.) and multi-breakpoint reflow across mobile, tablet, and desktop screens. - ๐ Multi-Touch & Sensor Integration: Native pointer tracking, hover events, wheel velocity, and external scroll synchronization.
๐ฑ Platform Support #
| Platform | Supported | Engine Backend | Minimum Requirement |
|---|---|---|---|
| Android | โ | webview_flutter_android |
API Level 24+ (Android 7.0+) |
| iOS | โ | webview_flutter_wkwebview |
iOS 13.0+ |
| macOS | โ | webview_flutter_wkwebview |
macOS 10.15+ (Catalina) |
| Web | ๐ | Use the React or Vanilla JS SDK | Direct WebGL/Canvas |
| Windows / Linux | ๐ฅ๏ธ | Use the React or Vanilla JS SDK | Custom Webview host |
๐ฆ Installation #
Add exodeui_flutter to your pubspec.yaml:
dependencies:
exodeui_flutter: ^1.1.0
Run in terminal:
flutter pub get
Platform Setup #
macOS Setup
On macOS, grant outgoing network-client access to WKWebView in macos/Runner/DebugProfile.entitlements and macos/Runner/Release.entitlements:
<key>com.apple.security.network.client</key>
<true/>
๐ ๏ธ Usage & Quick Start #
1. Register Artboard Assets #
Export your artboard from exodeui.com and place it in your app's assets/ directory:
flutter:
assets:
- assets/hero.bexode # Recommended binary format
# or
- assets/hero.json # JSON artboard
2. Render Artboard in Widget Tree #
import 'package:flutter/material.dart';
import 'package:exodeui_flutter/exodeui_flutter.dart';
class HeroBanner extends StatelessWidget {
const HeroBanner({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
body: ExodeUICanvas(
bexodeAsset: 'assets/hero.bexode',
fit: ExodeFit.contain,
alignment: ExodeAlignment.center,
autoPlay: true,
onReady: (controller) {
debugPrint('Artboard loaded: ${controller.artboardId}');
},
onTrigger: (trigger, animation) {
debugPrint('Trigger fired: $trigger -> $animation');
},
onError: (message, stack) {
debugPrint('ExodeUI error: $message');
},
),
);
}
}
3. Alternative Loading Sources #
Load artboards from memory, JSON strings, or network payloads:
// 1. From pre-loaded .bexode binary bytes (e.g. HTTP download)
ExodeUICanvas(bexodeBytes: rawBytes)
// 2. From raw .exode JSON string
ExodeUICanvas(artboardJson: jsonString)
// 3. From decoded Map
ExodeUICanvas(artboard: artboardMap)
// 4. From JSON asset bundle
ExodeUICanvas(exodeAsset: 'assets/scene.json')
๐ฎ Controller API #
Control playback, fire triggers, inspect inputs, or modify charts dynamically using ExodeUICanvasController:
final controller = ExodeUICanvasController();
// Pass to ExodeUICanvas
ExodeUICanvas(
bexodeAsset: 'assets/card.bexode',
controller: controller,
autoPlay: false,
);
// All commands are safe and queue automatically until the artboard is ready
void onUserAction() async {
// Playback
await controller.play();
await controller.pause();
await controller.seek(1.5); // Seek to 1.5 seconds
// Layout & Scaling
await controller.setLayout(
fit: ExodeFit.cover,
alignment: ExodeAlignment.topCenter,
layoutScaleFactor: 1.2,
);
// State Machine Variables
controller.setInputBool('isHovered', true);
controller.setInputNumber('score', 98.5);
controller.setInputText('username', 'Alex');
final currentScore = await controller.getInput('score');
// Interactive Triggers
controller.fireTrigger('onSuccessPulse');
// Dynamic Chart & Component Updates
controller.updateGraphData('mainGraph', [10, 25, 40, 80]);
controller.setDropdownOptions('citySelect', ['New York', 'London', 'Tokyo']);
// External Scroll Synchronization
controller.handleScroll(0, 120.0);
}
๐ Audio #
Timeline clips play with their animations and Play Sound interactions play on events, with no setup needed. From Dart:
controller.playSound('Click', volume: 0.6, pitchVariance: 1);
controller.stopSound();
controller.setAudioMuted(true); // e.g. your app's sound toggle
controller.setAudioVolume(0.5);
On Android, audio plays immediately. On iOS, WebKit starts audio after the first tap on the canvas.
๐๏ธ Responsive Fit Modes (ExodeFit) #
Control how vector scenes adapt to different aspect ratios:
| Mode | Behavior |
|---|---|
ExodeFit.contain |
Scales uniformly to fit entirely inside container without cropping. |
ExodeFit.cover |
Covers container entirely, maintaining aspect ratio and cropping excess. |
ExodeFit.fill |
Stretches to fill container dimensions exactly. |
ExodeFit.fitWidth |
Scales to match width; allows vertical overflow. |
ExodeFit.fitHeight |
Scales to match height; allows horizontal overflow. |
ExodeFit.none |
1:1 pixel rendering with no scaling applied. |
ExodeFit.scaleDown |
Scales down if container is smaller; never scales up. |
ExodeFit.layout |
Activates ExodeUI auto-layout engine for flex container reflow. |
๐ก Comprehensive Callbacks #
Listen to state changes, component events, and custom listeners:
ExodeUICanvas(
bexodeAsset: 'assets/dashboard.bexode',
onReady: (controller) => debugPrint('Canvas initialized'),
onTrigger: (trigger, anim) => debugPrint('Trigger: $trigger -> $anim'),
onInputUpdate: (values) => debugPrint('Inputs changed: $values'),
onToggle: (name, checked) => debugPrint('Toggle $name: $checked'),
onInputChange: (name, text) => debugPrint('Text input $name: $text'),
onButtonClick: (name, objectId) => debugPrint('Clicked: $name ($objectId)'),
onGraphPointClick: (point) => debugPrint('Clicked point: $point'),
onLogicUpdate: (state) => debugPrint('Logic state update: $state'),
callbacks: {
// Custom state machine listener name
'onCelebrationEnd': (name, args) => showConfetti(),
},
)
๐งช Testing & Example App #
A complete runnable example is available in the example/ directory:
cd example
flutter create --platforms=ios,android,macos .
flutter pub get
flutter run
To run end-to-end integration tests on a real macOS or iOS device:
flutter test integration_test -d macos
๐ก Overcoming Native Boundaries & Best Practices #
1. Flutter RepaintBoundary & Shader Masking #
Because ExodeUI renders in a hardware-accelerated canvas, you can capture live frames into Flutter's native widget/layer tree at any time using controller.captureImage():
final pngBytes = await controller.captureImage();
if (pngBytes != null) {
// Convert to Flutter native Image widget
final image = Image.memory(pngBytes);
// Apply native Flutter ShaderMask, ColorFilter, or RepaintBoundary
ShaderMask(
shaderCallback: (bounds) => myGradient.createShader(bounds),
child: image,
);
}
2. App Size & Compression #
While the uncompressed JavaScript engine is ~2.0 MB, it compresses down to ~750 KB in production (.apk, .ipa, or macOS bundle) using standard gzip/brotli packaging.
3. Bypassing Mobile WebView CORS Restrictions #
If your artboards fetch live dynamic data from third-party APIs:
- Recommended: Bundle the data directly in the
.bexodebinary payload at export time. - Dynamic APIs: Fetch data via Flutter's native
httppackage (which is not subject to WebView browser CORS policies) and inject the payload into the artboard dynamically:final response = await http.get(Uri.parse('https://api.example.com/data')); controller.setInput('apiData', jsonDecode(response.body));
๐ Related Resources & Community #
- ExodeUI Design Editor: Create animations online at https://exodeui.com.
- React SDK:
npm install exodeui - GitHub Repository: https://github.com/exodeUI/exodeui
- Discord & Community: Join designers and developers at https://exodeui.com/community
๐ท๏ธ Keywords & Topics #
animation โข motion โข flutter โข exodeui โข vector-graphics โข physics โข rapier โข canvas โข state-machine โข interactive โข micro-interactions โข rive-alternative โข lottie-alternative โข bexode โข ui-design โข figma-to-flutter
๐ License #
Distributed under the MIT License. See LICENSE for more information. Copyright ยฉ 2026 ExodeUI. All rights reserved.