Skip to content

Convert your SVG file directly to Flutter paths and prevent all the messing with bezier curves.

Notifications You must be signed in to change notification settings

flutter-clutter/svg-to-flutter-path-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

svg-to-flutter-path-converter

Convert your SVG file directly to Flutter paths and prevent all the messing with bezier curves.

https://www.flutterclutter.dev/images/tools/svg-to-flutter-path-converter.png

Flutter Clutter

The tool was made in the context of my blog.
Find a demo here.
Also, a how to can be found here.

Usage as CLI Tool

To use this tool via CLI:

  • Clone this repository
  • cd into cloned directory

Use locally

If you want to install it locally to prevent pollution of your global node namespace, do this:

npm i

Then you can run the conversion using

npm start convert <svgFilePath> [options]

Use globally

If you want use it outside of the repository directory as well, use this:

npm i -g

The syntax to call the conversion via CLI is as follows:

svg-to-flutter convert <svgFilePath> [options]

The general usage looks like this:

Usage: svg-to-flutter [options] [command]

Commands:
  convert <filePath> [options]  Convert svg file to Flutter path
  help [command]      display help for command

Store the result on the file system

When you run it without any options, it will directly return the output. In order to store the result on the file system, use the optional output argument (-o or --output). You can either provide a directory, which will create a file output.dart or a path to a file you want to have created.

svg-to-flutter convert input.svg -o .
svg-to-flutter convert input.svg -o my-output.dart

Collaborators

  • Wojciech Warwas - Thankfully converted the JS+HTML tool into a separate node module

npm integration coming soon!

About

Convert your SVG file directly to Flutter paths and prevent all the messing with bezier curves.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published