HayesGordon a033d05081 fix: RivePanel intercept all pointer events (#11786) bc003d5d87
fix: reinit scripted objects owned by the state machine (#11783) 72f38fef07
fix: reinit scripted objects owned by the state machine when data binding is updated

chore: make viewmodel references safer (#11781) 0961388866

fix(unit tests): Update a test case to have a correctly-formatted category (#11778) 4edb867bde
One change updated the TEST_CASE categories to have braces `[ ]` since that's how they're expected to work, but another change added a test without. This fixes that one case.

Intersection board in renderer now allows overlap (#11724) 352adc26ac
The intersection board in the renderer currently breaks any overlapping shapes into separate draw groups. This change allows the render context to specify when overlapping within a draw group could be allowed.

feat(vkcwa): Move borrowed coverage to a dedicated subpass (#11761) 57feaeef08
This allows us to remove some dependencies from the main subpass and is
a more clear description of what we're doing -- a single rendering of
borrowed coverage, followed by moving on to the main subpass. It also
avoids some issues on Qualcomm with having SHADER_READ/WRITE
dependencies combined with input attachment dependencies on the main
subpass.

fix: allow artboard conditions without data context (#11776) e9c66affc8

fix(editor): stop audio when playback is stopped (#11771) d8ff1c2d88
* fix(editor): stop audio when playback is stopped

* feature: add pause, play and resume support for audio sounds in scripting

Armor the use of mapped gpu buffers (#11738) c4874f9ca2
It's possible that a GPU resource fails to map to system memory for some reason (for instance: if we lost the GL context). In that case, rather than attempt to write to a null pointer, we should instead just fail to draw anything.

Create TesselationDataFormat.txt (#11767) 2d76643c5e
* Create TesselationDataFormat.txt

* Josh nitpicking

* Fix Names

* Update TesselationDataFormat.txt

* Update TesselationDataFormat.txt

* Rename file

feature: expand view model instance support in scripting (#11744) a1966ba517

ArtboardComponentList optimizations (#11757) a3ef3daa73
Implements a couple of optimizations for Artboard lists:

Don't syncLayoutChildren during updateList as the artboards are being built up, only sync afterwards
For non-virtualized lists, keep the artboard and state machine instances in a vector and get them by index rather than having to look them up using their corresponding list item.

Co-authored-by: Gordon <pggordonhayes@gmail.com>
2026-02-27 18:04:03 +00:00
2023-07-06 08:49:14 +00:00
2022-11-15 23:07:11 +00:00
2022-11-15 23:07:11 +00:00
2022-11-15 23:07:11 +00:00
2020-07-08 16:36:55 -07:00
2022-06-16 15:51:45 -07:00

Pub Version Build Status Discord badge Twitter handle

Rive Flutter

Rive hero image

Rive Flutter is a runtime library for Rive, a real-time interactive design tool.

This library allows you to fully control Rive files in your Flutter apps and games.

Table of contents

Overview of Rive

Rive combines an interactive design tool, a new stateful graphics format, a lightweight multi-platform runtime, and a blazing-fast vector renderer. This end-to-end pipeline guarantees that what you build in the Rive Editor is exactly what ships in your apps, games, and websites.

For more information, check out the following resources:

Getting started

See the Getting Started with Rive in Flutter documentation.

Example App

The rive package depends on rive_native, and the code on GitHub may reference an unpublished version of rive_native. To run the example app, we recommend using the published version from Pub unless you intend to build the native libraries locally (see Building rive_native).

dart pub unpack rive        # Unpack the package source code and example app
cd rive/example             # Navigate to the example folder
flutter create .            # Create the platform folders
flutter pub get             # Fetch dependencies
flutter run                 # Run the example app

For more information, see the Runtime sections of the Rive help documentation:

Choosing a Renderer

In Rive Flutter you have the option to choose either the Rive renderer, or the renderer that is used in Flutter (Skia or Impeller).

You choose a desired renderer when creating a Rive File object. All graphics that are then created from this File instance will use the selected renderer.

final riveFile = (await File.asset(
  'assets/rewards.riv',
  // Choose which renderer to use
  riveFactory: Factory.rive,
))!;

Options:

  • Factory.rive for the Rive renderer
  • Factoy.flutter for the Flutter renderer

For more information and additional consideration, see Specifying a Renderer.

Note on the Impeller renderer

Starting in Flutter v3.10, Impeller has replaced Skia to become the default renderer for apps on the iOS platform and may continue to be the default on future platforms over time. As such, there is a possibility of rendering and performance discrepencies when using the Rive Flutter runtime with platforms that use the Impeller renderer that may not have surfaced before. If you encounter any visual or performance errors at runtime compared to expected behavior in the Rive editor, we recommend trying the following steps to triage:

  1. Try running the Flutter app with the --no-enable-impeller flag to use the Skia renderer. If the visual discrepancy does not show when using Skia, it may be a rendering bug on Impeller. However, before raising a bug with the Flutter team, try the second point below👇
flutter run --no-enable-impeller
  1. Try running the Flutter app on the latest master channel. It is possible that visual bugs may be resolved on the latest Flutter commits, but not yet released in the beta or stable channel.
  2. If you are still seeing visual discrepancies with just the Impeller renderer on the latest master branch, we recommend raising a detailed issue to the Flutter Github repo with a reproducible example, and other relevant details that can help the team debug any possible issues that may be present.

Supported platforms

Platform Flutter Renderer Rive Renderer
iOS
Android
macOS
Windows
Linux
Web

Be sure to read the platform specific considerations for the Rive Flutter package.

Awesome Rive

For even more examples and resources on using Rive at runtime or in other tools, checkout the awesome-rive repo.

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:

  1. Run flutter clean
  2. Run flutter pub get
  3. Run flutter run

Alternatively, you can manually run the rive_native setup script. In the root of your Flutter app, execute:

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

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:

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

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've done flutter run on the native platform, the libraries should already be available.

Otherwise, manually download the prebuilt libraries by doing:

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

Specify the desired --platform, options are macos, windows, and linux.

Now you can run flutter test.

Optionally build the libraries if desired:

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

If you encounter issues using rive_native in your tests, please reach out to us for assistance.

Contributing

We love contributions and all are welcome! 💙

Issues

Rive Flutter Legacy Runtime

You can find the old runtime code here: https://github.com/rive-app/rive-flutter-legacy

The last published Pub release for this code is rive: 0.13.20.

The majority of the new runtime code now lives in the rive_native package.

Description
Flutter runtime for Rive
Readme MIT 15 MiB
Languages
Dart 83.6%
C++ 9%
CMake 4.4%
Ruby 1.3%
HTML 0.5%
Other 1.1%