make static method

Path make({
  1. required Path path,
  2. double tipLength = 15,
  3. double tipAngle = math.pi * 0.2,
  4. bool isDoubleSided = false,
  5. bool isAdjusted = true,
})

Add an arrow to the end of the last drawn curve in the given path.

The returned path is moved to the end of the curve. Always add the arrow before moving the path, not after, else the move will be lost. After adding the arrow you can move the path, draw more and apply an arrow to the new drawn part.

If isDoubleSided is true (default to false), an arrow will also be added to the beginning of the first drawn curve.

tipLength is the length (in pixels) of each of the 2 lines making the arrow.

tipAngle is the angle (in radians) between each of the 2 lines making the arrow and the curve at this point.

If isAdjusted is true (default to true), the tip of the arrow will be rotated (not following the tangent perfectly). This improves the look of the arrow when the end of the curve as a strong curvature. Can be disabled to save performance when the arrow is flat.

Implementation

static Path make({
  required Path path,
  double tipLength = 15,
  double tipAngle = math.pi * 0.2,
  bool isDoubleSided = false,
  bool isAdjusted = true,
}) =>
    _make(path, tipLength, tipAngle, isDoubleSided, isAdjusted);