PathMotionAct class
Animates a widget along a custom path.
Moves the child widget along a Path from start to end as the animation progresses from 0 to 1. Optionally rotates the widget to follow the path tangent (useful for direction-aware animations like arrows or vehicles).
The widget follows the path's geometry exactly, making this ideal for complex curved motions, orbital patterns, and scenic animations.
Constructors
- PathMotionAct({required Path path, bool autoRotate = false, AlignmentGeometry alignment = Alignment.center, CueMotion? motion, Duration delay = Duration.zero})
-
Animates an object along a custom path.
const
- PathMotionAct.arc({required double radius, Offset center = Offset.zero, double startAngle = 0.0, double startOffset = 0.0, required double sweepAngle, bool autoRotate = false, AlignmentGeometry alignment = Alignment.center, CueMotion? motion, Duration delay = Duration.zero})
- Animates motion along an arc segment.
- PathMotionAct.circular({bool autoRotate = false, AlignmentGeometry alignment = Alignment.center, required double radius, Offset center = Offset.zero, double startAngle = 0.0, CueMotion? motion, Duration delay = Duration.zero})
- Animates circular motion with optional rotation.
Properties
- alignment → AlignmentGeometry
-
The pivot point for rotation and positioning.
final
- autoRotate → bool
-
Whether to rotate the widget to match the path tangent.
final
- delay → Duration
-
Delay before this act's forward animation starts.
finalinherited
- hashCode → int
-
The hash code for this object.
no setter
- key → ActKey
-
The unique identifier for this act type.
final
- motion → CueMotion?
-
Per-act motion override. When non-null, replaces the motion inherited
from Actor or Cue for this act only.
finalinherited
- path → Path
-
The path the widget will follow during animation.
final
-
reverse
→ ReverseBehaviorBase<
Matrix4> -
Reverse behavior for this act — controls what happens when the animation
plays in reverse.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
apply(
BuildContext context, covariant CueAnimation< Matrix4> animation, Widget child) → Widget -
Applies the animated value to
childand returns the resulting widget. -
applyInternal(
BuildContext context, covariant CueAnimation< Object?> animation, Widget child) → Widget -
Delegates to
applyafter asserting thatanimationhas the expected typeCueAnimation<R>.inherited -
buildAnimation(
CueTimeline timline, ActContext context) → CueAnimation< Matrix4> -
Builds and registers the animation tracks on
timline, returning a CueAnimation that provides the current animated value at each frame.inherited -
buildAnimtable(
ActContext context) → CueAnimtable< Matrix4> -
Assembles the forward and reverse animatables into a single
CueAnimtable, wrapping them in a DualAnimatable when a separate
reverse animatable is present.
inherited
-
buildTweens(
ActContext context) → (CueAnimtable< Matrix4> , CueAnimtable<Matrix4> ?) - Builds the forward and optional reverse CueAnimtables for this act.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolve(
ActContext context) → ActContext -
Merges this act's own motion/delay settings with the inherited ActContext.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool - The equality operator.