MotionSpline constructor
MotionSpline(
- {required PointSetterCallback setter,
- required List<
Offset> points, - required double duration,
- Curve? curve}
Creates a new spline motion with a set of points. The setter is a
callback for setting the positions, points define the spline, and
duration
is the time for the motion to complete. Optionally a curve
can be used for easing.
Implementation
MotionSpline({
required this.setter,
required this.points,
required double duration,
Curve? curve,
}) : super(duration, curve) {
_dt = 1.0 / (points.length - 1.0);
}