dashed method

Path dashed(
  1. List<double> intervals
)

Creates a dashed version of this path.

The interval list is read in a circular fashion, such that the first interval is used to dash and the second to move. If the list is an odd number of elements, it is effectively the same as if it were repeated twice.

Callers are responsible for not passing interval lists consisting entirely of 0.

Implementation

Path dashed(List<double> intervals) {
  if (intervals.isEmpty) {
    return this;
  }
  final _PathDasher dasher = _PathDasher(intervals);
  return dasher.dash(this);
}