rive_native 0.0.1-dev.6 copy "rive_native: ^0.0.1-dev.6" to clipboard
rive_native: ^0.0.1-dev.6 copied to clipboard

Rive's native runtime and renderer for Flutter.

rive_native #

Rive Native is a new runtime that allows you to display and interact with Rive graphics in your Flutter app, powered by the Rive Renderer.

Differences between rive_native and the current Rive Flutter runtime are:

  • rive_native is driven by Rive's C++ runtime through FFI, no longer through a Dart implementation of that same runtime. This ensures a more consistent experience across platforms and the Rive Editor. It also allows for future performance improvements and new features that are only available in the C++ runtime - such as Responsive Layouts, Scrolling, N-Slicing, and Feathering.
  • rive_native brings the Rive Renderer to Flutter. You can still opt to use the Flutter-based renderer (Dart / Impeller). There will be times when one is preferred over the other. More documentation will be added on how to choose the correct renderer for your use case. If performance is top priority, we recommend using the Rive Renderer. Some features, such as Feathering, is only supported with the Rive Renderer. See our Feature Support page for more information.

Rive Native vs Rive #

This runtime does not replace the current Rive Flutter runtime (rive). Instead, we are working on integrating rive_native into the rive package. You can use rive_native independently if desired, and the API will largely remain consistent between rive_native and rive. However, the rive package may expose additional APIs or functionality in the future.

We encourage you to start using rive_native today and provide us feedback.

Platform Support #

Rive Renderer: https://rive.app/renderer Flutter Renderer: Skia / Impeller

Platform Flutter Renderer Rive Renderer
iOS
Android
macOS
Windows
Linux
Web

Android support is currently limited to arm and arm64 architecture.

Feature Support #

Runtime features currently supported by rive_native:

Feature Support
Set State Machines Inputs
Set State Machines Nested Inputs
Updating Text Runs
Updating Nested Text Runs
Responsive Layouts
Rive Audio
Out-of-Band Assets
Rive Events

Getting Started #

rive_native is not yet publicly available on Github, but will be. For now, you can pull the source code and example by running:

dart pub unpack rive_native
cd rive_native/example
flutter create . # create the platform folders
flutter pub get
flutter run

A higher-level declarative API is being developed to make it easier to work with Rive graphics in your Flutter app.

See the rive_player.dart file in rive_native/example/rive_player.dart for an example implementation on how to use this package.

Trouble Shooting #

The relevant native libraries should automatically be downloaded during the build step (flutter run or flutter build).

If you encounter difficulties please try the following:

  • flutter clean
  • flutter pub get
  • flutter run

Alternatively you can run the rive_native setup scripts directly. In the root of your Flutter app, run:

dart run rive_native:setup --verbose --clean --platform macos

This will perform a clean of the rive_native setup and download the specified platform libraries set with the --platform flag. See Platform Support above.

Building rive_native #

By default the prebuilt native libraries will be downloaded and used. Alternatively, you have the option to build the libraries yourself using rive_native setup, passing the --build flag:

flutter clean # important
dart run rive_native:setup --verbose --clean --build --platform macos

This will requires certain tooling to be available on your machine. We'll be providing more documentation soon.

Testing #

Shared libraries are also included in the download/build process. If you encounter difficulties using rive_native in your tests please reach out to us.

35
likes
0
points
660
downloads

Publisher

verified publisherrive.app

Weekly Downloads

Rive's native runtime and renderer for Flutter.

Homepage

Topics

#animation #ui #effects #renderer #games

License

unknown (license)

Dependencies

args, ffi, flutter, flutter_web_plugins, graphs, http, meta, plugin_platform_interface, vector_math, web

More

Packages that depend on rive_native