Skip to content
pubscout

svg_path_parser

1.1.2, released 3 years ago by masterashu.codes

Parse an SVG path string into a dart:ui Path object.

WASM-ready
$ flutter pub add svg_path_parser
Source repository

What it does

A Flutter and Dart utility package that allows developers to parse SVG path strings into equivalent Path objects from the dart:ui library. It supports handling various SVG path commands including cubic Bézier curves and absolute or relative movements.

AI-written summary of version 1.1.2, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to render custom SVG path strings directly onto Flutter canvases or CustomPainters.
  • You want to convert vector graphic path data into a standard Path object.

Skip it when

  • You need a full-featured SVG rendering engine to load and display complete .svg files.
  • You are not working with raw SVG path data string components.

Strengths

  • Simple and focused API for parsing SVG path strings.
  • Supports null safety and multiple platforms including web, mobile, and desktop.

Weaknesses

  • Limited to parsing path strings rather than rendering full SVG documents.
  • No built-in widget for full SVG file rendering.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
1
Path path = parseSvgPath('m.29 47.85 14.58 14.57 62.2-62.2h-29.02z');

Alternatives

Packages that do the same job and could replace svg_path_parser.

Works with

Packages commonly used together with svg_path_parser: ones it builds on, ones built on it, and its own family.