RiveAnimation class Null safety

High level widget that plays an animation from a Rive file. If artboard or animation are not specified, the default artboard and first animation fonund within it are used.

Inheritance

Constructors

RiveAnimation.asset(String name, {String? artboard, List<String> animations = const [], List<String> stateMachines = const [], BoxFit? fit, Alignment? alignment, Widget? placeHolder, bool antialiasing = true, List<RiveAnimationController> controllers = const [], OnInitCallback? onInit})
Creates a new RiveAnimation from an asset bundle
const
RiveAnimation.network(String name, {String? artboard, List<String> animations = const [], List<String> stateMachines = const [], BoxFit? fit, Alignment? alignment, Widget? placeHolder, bool antialiasing = true, List<RiveAnimationController> controllers = const [], OnInitCallback? onInit})
const

Properties

alignment Alignment?
Alignment for the animation in the widget
final
animations List<String>
List of animations to play; default animation if not specified
final
antialiasing bool
Enable/disable antialiasing when rendering
final
artboard String?
The name of the artboard to use; default artboard if not specified
final
controllers List<RiveAnimationController>
Controllers for instanced animations and state machines; use this to directly control animation states instead of passing names.
final
fit BoxFit?
Fit for the animation in the widget
final
hashCode int
The hash code for this object. [...]
@nonVirtual, read-only, inherited
key Key?
Controls how one widget replaces another widget in the tree. [...]
final, inherited
name String
The asset name or url
final
onInit OnInitCallback?
Callback fired when Riveanimation has initialized
final
placeHolder Widget?
Widget displayed while the rive is loading
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
src → _Source
The type of source used to retrieve the asset
final
stateMachines List<String>
List of state machines to play; none will play if not specified
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree. [...]
inherited
createState() → _RiveAnimationState
Creates the mutable state for this widget at a given location in the tree. [...]
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children. [...]
@protected, inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node. [...]
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep. [...]
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object. [...]
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants. [...]
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object. [...]
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
@nonVirtual, inherited