Rive는 Rive 편집기로 생성한 상호작용 애니메이션과 그래픽의 런타임 렌더링을 가능하게 하는 Flutter 패키지입니다. 개발자들이 여러 플랫폼에서 부드럽고 가벼운 벡터 애니메이션을 앱에 통합할 수 있도록 합니다. 실시간 애니메이션 재생, 상태 관리 및 반응형 디자인을 지원하여 동적 UI와 게임 자산에 적합합니다. Android, iOS, Web, macOS, Windows, Linux를 모두 지원하며 일관된 성능과 시각적 정확성을 보장합니다. 간단한 API를 사용해 Flutter 애플리케이션과 원활하게 통합될 수 있도록 설계되었습니다.
사용 사례
인터랙티브 앱 인터페이스
게임 캐릭터 애니메이션
로딩 표시기
온보딩 경험
애니메이션 버튼
Micro-interactions
주요 기능
벡터 기반 애니메이션
실시간 재생
상태 기계 지원
크로스 플랫폼 호환성
경량 성능
플러터 통합이 간편합니다
적합한 대상
UI/UX 디자이너
게임 개발자
모바일 앱 개발자
웹 개발자
애니메이션 중심 프로젝트
인터랙티브 프로토타입
고려 사항
자산 생성에는 Rive 편집기가 필요합니다
Rive 파일 형식 (.riv) 으로 제한
Rive의 애니메이션 시스템을 배우는 것이 필요할 수 있습니다
성능은 애니메이션의 복잡성에 따라 달라집니다
정적 이미지에는 적합하지 않습니다
Rive 호환 디자인 워크플로와 함께 사용하는 것이 가장 좋습니다
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
Rive Flutter
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.
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:
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 appcd 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:
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 = (awaitFile.asset(
'assets/rewards.riv',
// Choose which renderer to use
riveFactory: Factory.rive,
))!;
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:
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
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.
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.
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:
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:
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. In the root of your Flutter app:
flutter clean # Important
flutter pub get
dart run rive_native:setup --verbose --clean --build --platform macos
See Building rive_native in the official docs for the required tooling per platform, supported --platform values, web specifics, and how to return to the prebuilt libraries.
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.