패키지, 저장소 및 앱 카테고리 검색

rive 표지
패키지 상세v0.14.11

rive

Rive Flutter 런타임. 이 패키지는 https://rive.app 에서 사용할 수 있는 Rive 편집기로 제작된 Rive 그래픽의 런타임 기능을 제공합니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
55.2만
좋아요
2천
Pub 점수
140

패키지 설치

flutter pub add rive

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

Rive는 Rive 편집기로 생성한 상호작용 애니메이션과 그래픽의 런타임 렌더링을 가능하게 하는 Flutter 패키지입니다. 개발자들이 여러 플랫폼에서 부드럽고 가벼운 벡터 애니메이션을 앱에 통합할 수 있도록 합니다. 실시간 애니메이션 재생, 상태 관리 및 반응형 디자인을 지원하여 동적 UI와 게임 자산에 적합합니다. Android, iOS, Web, macOS, Windows, Linux를 모두 지원하며 일관된 성능과 시각적 정확성을 보장합니다. 간단한 API를 사용해 Flutter 애플리케이션과 원활하게 통합될 수 있도록 설계되었습니다.

사용 사례

  • 인터랙티브 앱 인터페이스
  • 게임 캐릭터 애니메이션
  • 로딩 표시기
  • 온보딩 경험
  • 애니메이션 버튼
  • Micro-interactions

주요 기능

  • 벡터 기반 애니메이션
  • 실시간 재생
  • 상태 기계 지원
  • 크로스 플랫폼 호환성
  • 경량 성능
  • 플러터 통합이 간편합니다

적합한 대상

  • UI/UX 디자이너
  • 게임 개발자
  • 모바일 앱 개발자
  • 웹 개발자
  • 애니메이션 중심 프로젝트
  • 인터랙티브 프로토타입

고려 사항

  • 자산 생성에는 Rive 편집기가 필요합니다
  • Rive 파일 형식 (.riv) 으로 제한
  • Rive의 애니메이션 시스템을 배우는 것이 필요할 수 있습니다
  • 성능은 애니메이션의 복잡성에 따라 달라집니다
  • 정적 이미지에는 적합하지 않습니다
  • Rive 호환 디자인 워크플로와 함께 사용하는 것이 가장 좋습니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

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. 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.

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.

카테고리

의존성

의존성 목록 1 개

소스 저장소

이 패키지를 사용하는 프로젝트