NibPathMotion class

Animates child's position (and optionally rotation) along a custom Path.

NibPathMotion drives a MotionValue<double> progress value (0.0 to 1.0) with a Ticker-based tween over duration/curve — the same per-frame-write-into-a-MotionValue pattern SpringSolver uses, just curve-tweened instead of spring-simulated. RenderProxyBox reads path's PathMetrics directly in paint() and translates (and, if rotate is true, rotates) child to the tangent point at the current progress — animating never triggers a widget rebuild.

If progress is supplied, this widget reads that external MotionValue<double> instead of driving its own — the same "external MotionValue override" pattern NibMotion itself uses for motionValues.

Inheritance
Available extensions

Constructors

NibPathMotion({Key? key, required Widget child, required Path path, MotionValue<double>? progress, Duration duration = const Duration(milliseconds: 1000), Curve curve = Curves.easeInOut, bool repeat = false, bool autoPlay = true, bool rotate = false, NibPathMotionController? controller})
Creates a NibPathMotion.
const

Properties

autoPlay bool
Whether traversal starts automatically on first build, when progress is not supplied.
final
child Widget
The widget moved along path.
final
controller NibPathMotionController?
Imperative handle for play/pause/restart. See NibPathMotionController.
final
curve Curve
The easing curve applied to traversal, when progress is not supplied.
final
duration Duration
How long a single traversal of path takes, when progress is not supplied.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
path Path
The path child travels along, in this widget's local coordinate space.
final
progress MotionValue<double>?
An external progress value (0.0 to 1.0) to read instead of driving an internal ticker. When supplied, duration, curve, repeat, and autoPlay are ignored — the caller is fully responsible for driving this value.
final
repeat bool
Whether traversal restarts from 0.0 after completing, when progress is not supplied.
final
rotate bool
Whether child is rotated to align with path's tangent direction at the current progress.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

animate({Object? initial, Object? animate, NibAnim? exit, NibTransition? transition, NibAnim? whileTap, NibAnim? whileHover, Key? key}) Widget

Available on Widget, provided by the NibMotionWidgetExtension extension

Wraps this widget in a NibMotion.
createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<NibPathMotion>
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.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
revealOnScroll({NibAnim? initial, bool once = true}) Widget

Available on Widget, provided by the NibMotionWidgetExtension extension

Wraps this widget in a NibScrollReveal.
shimmer({bool enabled = true}) Widget

Available on Widget, provided by the NibMotionWidgetExtension extension

Wraps this widget in a NibShimmer.
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, int wrapWidth = 65}) 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.
inherited