subPaths property

Iterable<Path> get subPaths

Returns an iterable of subpaths that make up the current path.

This generator function iterates over all the path metrics and extracts each subpath from the beginning to the full length of the metric. Useful for handling paths in segments.

Implementation

Iterable<Path> get subPaths sync* {
  for (final metric in computeMetrics()) {
    final subPath = metric.extractPath(0, metric.length);
    yield subPath;
  }
}