StateMachinePainter class base

Inheritance
Mixed-in types

Constructors

StateMachinePainter({String? stateMachineName, void withStateMachine(StateMachine)?, Fit fit = RiveDefaults.fit, Alignment alignment = RiveDefaults.alignment, RiveHitTestBehavior hitTestBehavior = RiveDefaults.hitTestBehaviour, MouseCursor cursor = RiveDefaults.mouseCursor})

Properties

alignment Alignment
Controls how the artboard is aligned within its bounds.
getter/setter pairinherited
artboard Artboard?
no setterinherited
cursor MouseCursor
The cursor to use when the pointer is over the hit test area.
getter/setter pairinherited
fit Fit
Controls how the artboard is scaled and positioned within its bounds.
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
hitTestBehavior RiveHitTestBehavior
The hit test behavior to use when determining if a pointer event occurred within the widget's bounds and to check if a hit occurred on a Rive listener.
getter/setter pairinherited
isSemanticsEnabled bool
Whether semantic tree tracking is currently enabled.
no setterinherited
isTickerActive bool
Whether the animation ticker is currently active.
no setterinherited
lastSize Size
no setterinherited
layoutScaleFactor double
The scale factor to use for a fit of type Fit.layout.
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
semanticsEnabled bool
Enable or disable semantic tree tracking.
no getterinherited
semanticsStateMachine StateMachine?
The state machine to query for semantic diffs.
no setter
semanticTree → SemanticTreeModel?
The semantic tree model, updated each frame by updateSemantics. Null until semanticsEnabled is set to true.
no setterinherited
size Size
no setterinherited
stateMachine StateMachine?
no setter
stateMachineName String?
final
withStateMachine → void Function(StateMachine)?
final

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
advance(double elapsedSeconds) bool
Called each frame to advance the animation.
override
artboardChanged(Artboard artboard) → void
Called when the underlying artboard changes.
override
dispose() → void
Discards any resources used by the object.
override
disposeSemantics() → void
Dispose the semantic tree. Call from your painter's dispose method.
inherited
hitTest(Offset position) bool
Determine if a pointer event occurred within the widget's bounds and to check if a hit occurred on a Rive listener.
override
localToArtboard({required Offset position, required AABB artboardBounds, required Fit fit, required Alignment alignment, required Size size, double scaleFactor = RiveDefaults.layoutScaleFactor}) Vec2D
Convert a local offset to the artboard coordinate space.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
paint(Renderer renderer, Size size, double paintPixelRatio) → void
Called each frame to paint the artboard.
inherited
pointerEvent(PointerEvent event, HitTestEntry<HitTestTarget> entry) → void
Handle a pointer event.
override
prepassCanvases() → void
Called before the main RenderContext frame opens to run scripted canvas draws in their own frame. Override in subclasses that manage an artboard.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
scheduleRepaint() → void
Request a repaint of the artboard.
inherited
toString() String
A string representation of this object.
inherited
updateSemantics() → void
Query the state machine for semantic diffs and apply them to semanticTree. Call this from your advance method after advancing the animation.
inherited

Operators

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