curveCardinalTension function Curves

CurveCardinal Function(Path) curveCardinalTension(
  1. num tension
)

Returns a cardinal curve with the specified tension in the range [0, 1].

The tension determines the length of the tangents: a tension of one yields all zero tangents, equivalent to curveLinear; a tension of zero produces a uniform Catmull–Rom (see curveCatmullRom) spline. For example:

final line = Line(…)..curve = curveCardinalTension(0.5);

Implementation

CurveCardinal Function(Path) curveCardinalTension(num tension) {
  return (context) => CurveCardinal(context, tension);
}