Artboard class abstract

A Rive artboard containing animations, state machines, and components.

Artboards are the root containers for Rive content. Use File.artboard, File.artboardAt, or File.defaultArtboard to obtain an artboard instance.

Constructors

Artboard()

Properties

bounds AABB
The bounding box of this artboard in its local coordinate space.
no setter
frameOrigin bool
Whether the artboard origin is at frame center (true) or original position.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
height double
The current height of the artboard.
getter/setter pair
heightBounds double
The height from bounds. See bounds.
no setter
heightOriginal double
The original height of the artboard as defined in the editor.
no setter
layoutBounds AABB
The bounding box after layout has been applied.
no setter
name String
The name of this artboard as defined in the Rive editor.
no setter
opacity double
The opacity of the artboard (0.0 to 1.0).
getter/setter pair
renderTransform Mat2D
The transformation matrix applied when rendering.
getter/setter pair
riveFactory Factory?
The factory that was used to load this artboard.
no setter
rootFocusDataCount int
Get count of root FocusData nodes in this artboard. Root FocusData nodes are those without a parent FocusData within this artboard.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
textRuns List<TextValueRunRuntime>
Get all text runs in the artboard - including nested artboards (components)
no setter
width double
The current width of the artboard.
getter/setter pair
widthBounds double
The width from bounds. See bounds.
no setter
widthOriginal double
The original width of the artboard as defined in the editor.
no setter
worldBounds AABB
The bounding box in world coordinates.
no setter

Methods

addedToHost() → void
advance(double seconds, {int flags = 9}) bool
Advances the artboard animation by seconds.
animationAt(int index) Animation
Returns the animation at index.
animationCount() int
Returns the number of animations in this artboard.
animationNamed(String name) Animation?
Returns the animation with the given name, or null if not found.
bindViewModelInstance(ViewModelInstance viewModelInstance) → void
Binds the provided viewModelInstance to the artboard
buildFocusTreeWithParent(FocusNode? parentNode) → void
Build the focus tree for this artboard using a parent FocusNode. The FocusManager is derived from the parent node's manager() reference. This is a convenience method for nested artboards - pass the parent's FocusNode and the artboard will automatically register its focus nodes with the correct manager.
component(String name) Component?
Returns the component with the given name, or null if not found.
defaultStateMachine() StateMachine?
Returns the default state machine, or null if none is set.
dispose() → void
Releases all resources associated with this artboard.
draw(Renderer renderer) → void
Draws this artboard using the provided renderer.
getRootFocusNodes() List<FocusNode>
Get all root FocusNodes from this artboard. These are FocusNodes from FocusData objects that don't have a parent FocusData within this artboard.
getText(String runName, {String? path}) String
Get a text run value with runName at optional path.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resetArtboardSize() → void
Resets the artboard size to its original dimensions.
rootFocusNodeAt(int index) → FocusNode?
Get the FocusNode for root FocusData at index. Returns null if index is out of bounds.
setExternalParentFocusNode(FocusNode? node) → void
Set an external parent FocusNode for this artboard's root-level focus nodes. This is used when the artboard is nested inside another artboard that has a FocusData in its hierarchy. The external parent allows focus nodes in this artboard to be children of a FocusData in the host artboard, even across artboard boundaries.
setText(String runName, String value, {String? path}) bool
Set a text run value with runName at optional path to value.
stateMachine(String name) StateMachine?
Returns the state machine with the given name, or null if not found.
stateMachineAt(int index) StateMachine?
Returns the state machine at index, or null if out of bounds.
stateMachineCount() int
Returns the number of state machines in this artboard.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited