discontinuedPackage vector_graphics_compiler_plus has been discontinued and replaced by vector_graphics_compiler.

toPath method

Path toPath({
  1. bool reset = true,
})

Creates a new Path object from the commands in this path.

If reset is set to false, this builder can be used to create multiple path objects with the same commands. By default, the builder will reset to an initial state.

Implementation

Path toPath({bool reset = true}) {
  final Path path = Path(
    commands: _commands,
    fillType: fillType,
  );

  if (reset) {
    _commands.clear();
  }
  return path;
}