Low level toolkit for SVG paths transformations. Sometime you can't use
transformattributes and have to apply changes to svg paths directly. Then this package is for you :) !
This package works both
Constructor. Creates new
SvgPath class instance.
Converts all path commands to absolute.
Converts all path commands to relative. Useful to reduce output size.
Rescale path (the same as SVG
sx by default.
Translate path (the same as SVG
y = 0 by default.
Rotate path to
angle degrees around (rx, ry) point. If rotation center not set,
(0, 0) used. The same as SVG
Skew path along the X axis by
Skew path along the Y axis by
Apply 2x3 affine transform matrix to path. Params - array. The same as SVG
Any SVG transform or their combination. For example
The same format, as described in SVG standard for
Converts smooth curves
s with "missed" control point to
generic curves (
Replaces all arcs with bezier curves.
Returns final path string.
Round all coordinates to given decimal precision. By default round to integer. Useful to reduce resulting output string size.
Apply iterator to all path segments.
yparams. Where (x, y) - absolute coordinates of segment start point.
means that current segment should be deleted).
If second param
keepLazyStack set to
true, then iterator will not evaluate
stacked transforms prior to run. That can be useful to optimize calculations.
Add this to your package's pubspec.yaml file:
dependencies: svgpath: "^0.0.1"
You can install packages from the command line:
$ pub get
$ flutter packages get
Alternatively, your editor might support
pub get or
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
|1.0.0||Jan 15, 2017|
|0.1.0||Jan 6, 2017|
|0.0.1||Dec 31, 2016|
We analyzed this package on Mar 5, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Detected platforms: Flutter, web, other
No platform restriction found in primary library
The description is too short.
Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.
Package is pre-v1 release.
While there is nothing inherently wrong with versions of
0.*.*, it usually means that the author is still experimenting with the general direction API.
Maintain an example.
Create a short demo in the
example/directory to show how to use this package. Common file name patterns include:
example.dartor you could also use
Fix issues reported by
dartfmtreported 3 hints.
Strong-mode analysis of
lib/src/svgpath.dartgave the following hint:
line: 333 col: 3
This function declares a return type of 'SvgPath', but doesn't end with a return statement.
Similar analysis of the following files failed: