rive library Null safety
- A fill Shape painter.
- 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.
- Abstraction for receiving a per frame callback while isPlaying is true to apply animation based on an elapsed amount of time.
- Encapsulates a RiveFile and provides access to the list of Artboard objects it contains.
- 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.
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.
- A boolean StateMachine input instance. Use the value property to change the input which will automatically re-activate the StateMachineController if necessary.
- SMI = StateMachineInstance [...]
- A numeric StateMachine input instance. Use the value property to change the input which will automatically re-activate the StateMachineController if necessary.
- A trigger StateMachine input instance. Use the fire method to change the input which will automatically re-activate the StateMachineController if necessary.
- A solid color painter for a shape. Works for both Fill and Stroke.
- An AnimationController which controls a StateMachine and provides access to the inputs of the StateMachine.
- A stroke Shape painter.
- Artboard extensions
- riveVersion → const RuntimeVersion
const RuntimeVersion(7, 0)
- Loop options for linear animations.
- 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.