byIndex static method

Path byIndex(
  1. int index,
  2. Size size
)

The path with the given index, fitted into size while keeping its aspect ratio and centered on the origin.

Implementation

static Path byIndex(int index, Size size) {
  final (_, build) = _paths[index];
  return build(size).centered.resizeTo(size, keepRatio: true);
}