Artboard class Null safety

Inheritance
Implementers
Available Extensions

Constructors

Artboard()

Properties

animations → AnimationList
List of animations and state machines in the artboard.
read-only
antialiasing bool
read / write
artboard Artboard
The artboard this component belongs to.
read-only
canBeOrphaned bool
Artboard are one of the few (only?) components that can be orphaned.
read-only
children → ContainerChildren
final, inherited
context RuntimeArtboard
covariant, read / write, inherited
coreType int
read-only, inherited
coreTypes Set<int>
read-only, inherited
dependents Set<Component>
read-only, inherited
dirt int
read / write, inherited
drawables List<Drawable>
read-only
fills Set<Fill>
final, inherited
graphOrder int
read / write, inherited
hasAnimations bool
Does this artboard have animations?
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
hasValidated bool
read-only, inherited
height double
Height of the artboard.
read / write, inherited
id int
read / write, inherited
linearAnimations Iterable<LinearAnimation>
List of linear animations in the artboard.
read-only
name String
Non-unique identifier, used to give friendly names to elements in the hierarchy. Runtimes provide an API for finding components by this name.
read / write, inherited
originWorld → Vec2D
read-only
originX double
Origin x in normalized coordinates (0.5 = center, 0 = left, 1 = right).
read / write, inherited
originY double
Origin y in normalized coordinates (0.5 = center, 0 = top, 1 = bottom).
read / write, inherited
parent ↔ ContainerComponent?
read / write, inherited
parentId int
Identifier used to track parent ContainerComponent.
read / write, inherited
path Path
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
stateMachines Iterable<StateMachine>
List of state machines in the artboard.
read-only
strokes Set<Stroke>
final, inherited
userData ↔ dynamic
read / write, inherited
width double
Width of the artboard.
read / write, inherited
worldTransform → Mat2D
Our world transform is always the identity. Artboard defines world space.
read-only
worldTranslation → Vec2D
read-only
x double
X coordinate in editor world space.
read / write, inherited
y double
Y coordinate in editor world space.
read / write, inherited

Methods

addComponent(Component component) → void
Adds a component to the artboard. Good place for the artboard to check for components it'll later need to do stuff with (like draw them or sort them when the draw order changes).
addController(RiveAnimationController controller) bool
Add an animation controller to this artboard. Playing will be scheduled if it's already playing.
addDependent(Component dependent) bool
inherited
addDirt(int value, {bool recurse = false}) bool
inherited
addFill(Fill fill) bool
inherited
addStroke(Stroke stroke) bool
inherited
advance(double elapsedSeconds) bool
Update any dirty components in this artboard.
appendChild(Component child) → void
inherited
buildDependencies() → void
@mustCallSuper, inherited
buildDrawOrder(List<Drawable> drawables, DrawRules? rules, List<DrawRules> allRules) → void
inherited
childAdded(Component child) → void
@mustCallSuper, inherited
childRemoved(Component child) → void
inherited
clone<K extends Core<CoreContext>>() → K?
Make a duplicate of this core object, N.B. that all properties including id's are copied.
inherited
computeDrawOrder() → void
copy(covariant ArtboardBase source) → void
Copies property values, currently doesn't trigger change callbacks. It's meant to be a helper for clone.
inherited
draw(Canvas canvas) → void
Draw the drawable components in this artboard.
forAll(DescentCallback cb) bool
inherited
forEachChild(DescentCallback cb) → void
inherited
forEachComponent(void callback(Component)) → void
heightChanged(double from, double to) → void
override
import(ImportStack stack) bool
inherited
instance() Artboard
internalAddAnimation(Animation animation) bool
Called by rive_core to add an Animation to an Artboard. This should be @internal when it's supported.
internalRemoveAnimation(Animation animation) bool
Called by rive_core to remove an Animation from an Artboard. This should be @internal when it's supported.
invalidateStrokeEffects() → void
Called whenever the compound path for this shape is changed so that the effects can be invalidated on all the strokes.
inherited
isValidParent(Component parent) bool
inherited
markDrawOrderDirty() → void
Let the artboard know that the drawables need to be resorted before drawing next.
markRebuildDependencies() → void
inherited
nameChanged(String from, String to) → void
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
onAdded() → void
inherited
onAddedDirty() → void
inherited
onComponentDirty(Component component) → void
onDependencyRemoved(Component dependent) → void
Something we depend on has been removed. It's important to clear out any stored references to that dependency so it can be garbage collected (if necessary).
inherited
onDirty(int mask) → void
inherited
onFillsChanged() → void
Called when a fill is added or removed.
onPaintMutatorChanged(ShapePaintMutator mutator) → void
Called whenever a new paint mutator is added/removed from the shape paints (for example a linear gradient is added to a stroke).
onRemoved() → void
When a component has been removed from the Core Context, we clean up any dangling references left on the parent and on any other dependent component. It's important for specialization of Component to respond to override onDependencyRemoved and clean up any further stored references to that component (for example the target of a Constraint).
@mustCallSuper, inherited
onStrokesChanged() → void
Called when a stroke is added or remoevd.
originXChanged(double from, double to) → void
override
originYChanged(double from, double to) → void
override
parentChanged(ContainerComponent? from, ContainerComponent? to) → void
@protected, inherited
parentIdChanged(int from, int to) → void
inherited
prependChild(Component child) → void
inherited
remove() → void
inherited
removeComponent(Component component) → void
Remove a component from the artboard and its various tracked lists of components.
removeController(RiveAnimationController controller) bool
Remove an animation controller form this artboard.
removeFill(Fill fill) bool
inherited
removeRecursive() → void
Recursive version of Component.remove. This should only be called when you know this is the only part of the branch you are removing in your operation. If your operation could remove items from the same branch multiple times, you should consider building up a list of the individual items to remove and then remove them individually to avoid calling remove multiple times on children.
inherited
removeStroke(Stroke stroke) bool
inherited
renderTranslation(Vec2D worldTranslation) → Vec2D
resolveArtboard() bool
Find the artboard in the hierarchy.
sortDependencies() → void
Sort the DAG for resolution in order of dependencies such that dependent compnents process after their dependencies.
sortDrawOrder() → void
toString() String
A string representation of this object. [...]
inherited
update(int dirt) → void
updateComponents() bool
Walk the dependency tree and update components in order. Returns true if any component updated.
userDataChanged(dynamic from, dynamic to) → void
inherited
validate() bool
inherited
visitAncestor(Component ancestor) → void
Called whenever we're resolving the artboard, we piggy back on that process to visit ancestors in the tree. This is a good opportunity to check if we have an ancestor of a specific type. For example, a Path needs to know which Shape it's within.
@mustCallSuper, inherited
widthChanged(double from, double to) → void
override
xChanged(double from, double to) → void
override
yChanged(double from, double to) → void
override

Operators

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