rive library

Classes

Artboard
ArtboardBase
CallbackAssetLoader
Convenience class that extends FileAssetLoader and allows you to register a callback for loading Rive assets.
CDNAssetLoader
Loads assets from Rive's CDN.
Event
EventBase
FallbackAssetLoader
Convenience class that extends FileAssetLoader and allows you to register fallbacks for loading Rive assets, such as images and fonts.
FileAssetLoader
Base class for resolving out of band Rive assets, such as images and fonts.
Fill
A fill Shape painter.
FillBase
FontAsset
FontAssetBase
ImageAsset
ImageAssetBase
LinearAnimation
LinearAnimationBase
LinearAnimationInstance
LinearGradient
A core linear gradient. Can be added as a child to a Shape's Fill or Stroke to paint that Fill or Stroke with a gradient. This is the foundation for the RadialGradient which is very similar but also has a radius value.
LinearGradientBase
LocalAssetLoader
Convenience class for loading assets from the local file system.
MountedArtboard
Represents the nested Artboard that'll actually be mounted and placed into the NestedArtboard component.
NestedArtboard
NestedArtboardBase
NetworkAssetResolver
Resolves a Rive asset from the network provided a baseUrl.
OneShotAnimation
Controller tailored for managing one-shot animations
RadialGradient
RadialGradientBase
Rive
RiveAnimation
High level widget that plays an animation from a Rive file. If artboard or animation are not specified, the default artboard and first animation found within it are used.
RiveAnimationController<T>
Abstraction for receiving a per frame callback while isPlaying is true to apply animation based on an elapsed amount of time.
RiveAnimationState
RiveEvent
A Rive Event that is reported from an StateMachineController.
RiveFile
Encapsulates a RiveFile and provides access to the list of Artboard objects it contains.
RiveGeneralEvent
A general Rive event that provides information about the event.
RiveOpenURLEvent
An Open URL Rive event that provides information about the URL and target.
RiveRenderObject
RiveScene
A widget that interfaces with a RiveSceneController to compose and render a scene of Rive artboards.
RiveSceneController
An abstraction for controlling the composition and rendering of a Rive scene.
RiveSceneRenderObject
RuntimeArtboard
This artboard type is purely for use by the runtime system and should not be directly referenced. Use the Artboard type for any direct interactions with an artboard, and use extension methods to add functionality to Artboard.
RuntimeMountedArtboard
RuntimeNestedArtboard
RuntimeNestedLinearAnimationInstance
RuntimeNestedStateMachineInstance
Shape
ShapeBase
SimpleAnimation
A simple RiveAnimationController that plays back a LinearAnimation defined by an artist. All playback parameters (looping, speed, keyframes) are artist defined in the Rive editor. This takes a declaritive approach of using an animationName as the only requirement for resolving the animation. When the controller is added to an artboard (note that due to widget lifecycles it could get re-initialized on another artboard later) it'll look for the animation. Not finding the animation is a condition this example deals with by simply nulling the AnimationInstance _instance which means it won't be applied during advance cycles. Another approach would be let this throw, but this one is a little more forgiving which can be desireable with files dynamically loaded (downloaded even) at runtime.
SMIBool
A boolean StateMachine input instance. Use the value property to change the input which will automatically re-activate the StateMachineController if necessary.
SMIInput<T>
SMI = StateMachineInstance
SMINumber
A numeric StateMachine input instance. Use the value property to change the input which will automatically re-activate the StateMachineController if necessary.
SMITrigger
A trigger StateMachine input instance. Use the fire method to change the input which will automatically re-activate the StateMachineController if necessary.
SolidColor
A solid color painter for a shape. Works for both Fill and Stroke.
SolidColorBase
StateMachine
StateMachineBase
StateMachineController
An AnimationController which controls a StateMachine and provides access to the inputs of the StateMachine.
Stroke
A stroke Shape painter.
StrokeBase
TextValueRun
TextValueRunBase

Enums

Extension
Loop
Loop options for linear animations.
OpenUrlTarget
Open URL event target types.
RiveHitTestBehavior
How to behave during hit tests on Rive Listeners (hit targets).
SMIType
StateMachines supports three input types. The StateMachine mostly abstracts types by allowing the programmer to query for an input of a specific Dart backing type, mapping it to the correct StateMachine type. This is the most flexible API to use to check if a type with a given name exists. However, if you need to iterate inputs and query their types, this enum is exposed for convenience.
Type

Extensions

ArtboardAdditions on Artboard
Artboard extensions
FileAssetExtension on FileAsset
TODO: do we prefer this, or do we want to wrap our FileAssets into a custom asset class.
RuntimeArtboardGetters on RuntimeArtboard
Adds getters for linear animations and state machines

Constants

riveVersion → const RuntimeVersion

Typedefs

ObjectGenerator = Core<CoreContext>? Function(int coreTypeKey)
OnInitCallback = void Function(Artboard)
The callback signature for onInit
OnRuntimeEvent = void Function(Event)
Callback signature for events firing.

Exceptions / Errors

RiveFormatErrorException
Thrown when a file being read doesn't match the Rive format.