Rive Native for Flutter
A Flutter plugin that integrates the Rive Renderer and the core Rive C++ runtime. Used by the Rive Flutter runtime.
Rive Native vs Rive
Rive Native (rive_native
) is a Flutter plugin that integrates the Rive Renderer and the core Rive C++ runtime.
The Rive Flutter runtime (rive
) is built on top of rive_native
. We recommend including the rive
package as a dependecy, as that will automatically include rive_native
, while also providing a user-friendly API for working with Rive assets in Flutter.
Rive Native replaces the Rive Common (rive_common
) plugin that Rive Flutter previously used for native operations.
Understanding Rive Native
Rive Native acts as the bridge between Flutter and the Rive C++ runtime, allowing you to use Rive graphics in your Flutter applications.
-
C++ Runtime Integration:
rive_native
is built on Rive’s C++ runtime via FFI. This ensures a consistent experience across platforms and the Rive Editor, while unlocking performance improvements and new features exclusive to the C++ runtime, such as: -
Rive Renderer Support:
rive_native
bring the Rive Renderer to Flutter. While you can still use the Flutter-based renderer (Dart/Impeller), the Rive Renderer is recommended for performance-critical use cases. For more information see Choosing a Renderer.Some features, like Vector Feathering, are only supported with the Rive Renderer. See the Feature Support page for more details.
Getting Started
rive_native
is not yet publicly available on GitHub but will be soon. For now, you can pull the source code and example by running:
For an example implementation, see the rive_player.dart
file in rive_native/example/rive_player.dart
.
Platform Support
Platform | Flutter Renderer | Rive Renderer |
---|---|---|
iOS | ✅ | ✅ |
Android | ✅ | ✅ |
macOS | ✅ | ✅ |
Windows | ✅ | ✅ |
Linux | ❌ | ❌ |
Web | ✅ | ✅ |
Feature Support
See the Feature Support page for details.
Troubleshooting
The required native libraries should be automatically downloaded during the build step (flutter run
or flutter build
). If you encounter issues, try the following:
- Run
flutter clean
- Run
flutter pub get
- Run
flutter run
Alternatively, you can manually run the rive_native
setup script. In the root of your Flutter app, execute:
This will clean the rive_native
setup and download the platform-specific libraries specified with the --platform
flag. Refer to the Platform Support section above for details.
Building rive_native
By default, prebuilt native libraries are downloaded and used. If you prefer to build the libraries yourself, use the --build
flag with the setup script:
Note: Building the libraries requires specific tooling on your machine. Additional documentation will be provided soon.
Testing
Shared libraries are included in the download/build process. If you encounter issues using rive_native
in your tests, please reach out to us for assistance.