HayesGordon 16b484c81c chore(flutter): release with rive_native bump and update examples (#10190) eec2f66855
* chore(flutter): bump rive_native

* chore(flutter): add examples

* docs: update changelog

fix: recursively check whether an artboard is its ancestor before usi… (#10184) 53fb2577bc
* fix: recursively check whether an artboard is its ancestor before using it as the source of a nested artboard

fix(wagyu): proper init of Wagyu Render Pass Inputs (#10175) ff8fc66bc4
* proper init of Wagyu Render Pass Inputs

* fixed build issues

* clang-format

* proper black clear color

chore: update thumbnailer for new rive building set-up 9fd4961e9b

Co-authored-by: Gordon <pggordonhayes@gmail.com>
2025-07-16 17:53:55 +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

To get started with Rive Flutter, check out the following resources:

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 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的Rive解决方案
Readme MIT 18 MiB
Languages
Dart 76.2%
C++ 13.4%
CMake 6.5%
Ruby 1.9%
HTML 0.8%
Other 1.1%