0Pricing
Flutter Mobile Development · Lesson

Embedding Rive Assets and Controllers

Load .riv files and drive playback through Rive artboards and animation controllers.

What Rive Brings to Flutter

Rive is a real-time interactive design tool. Its runtime exports a compact binary file with the .riv extension that contains vector art, bones, timelines, and state machines.

  • The rive Dart package renders these files natively on the GPU, so animations stay crisp at any resolution.
  • Unlike Lottie, Rive can run state machines driven by runtime inputs, making animations interactive rather than just playback-only.

In this lesson you will load a .riv asset, pick an artboard, and drive playback with an animation controller.

Adding the Dependency and Asset

First declare the package in pubspec.yaml and register the binary file under assets so Flutter bundles it.

  • The version constraint targets Rive 0.13.x, which exposes the RiveAnimation widget and the controller APIs used below.
  • The asset path is relative to the project root; any file inside a declared folder is included.
dependencies:
  flutter:
    sdk: flutter
  rive: ^0.13.1

flutter:
  assets:
    - assets/rive/vehicles.riv

All lessons in this course

  1. Embedding Rive Assets and Controllers
  2. State Machines and Input-Driven Motion
  3. Hero Transitions and Shared Element Motion
  4. Staggered and Choreographed AnimationControllers
← Back to Flutter Mobile Development