CubicBezier constructor

CubicBezier(
  1. List<Vector2> points
)

Constructs a cubic Bézier curve from a List of Vector2. The first point in points will be the curve's start point, the second and third points will be its control points, and the fourth point will be its end point.

Implementation

CubicBezier(List<Vector2> points) : super(points) {
  if (points.length != 4) {
    throw ArgumentError('Cubic Bézier curves require exactly four points');
  }
}