Skip to content

Latest commit

 

History

History
44 lines (32 loc) · 1.79 KB

README.md

File metadata and controls

44 lines (32 loc) · 1.79 KB

Refine SVG Script

This script is designed to refine and optimize SVG files for exporting to Flutter custom icons, ensuring no defective icons are generated.

Setup (macOS)

  1. Download Inkscape:

  2. Add Inkscape to zshrc:

    • Open the terminal and run:
      nano ~/.zshrc
    • Add the following line:
      export PATH="/Applications/Inkscape.app/Contents/MacOS:$PATH"
    • Save and exit by pressing Ctrl + O, then Enter, then Ctrl + X, then Y.
  3. Install SVGO using Homebrew:

    • Ensure Homebrew is installed. If not, visit Homebrew's official website for installation instructions.
    • Run the following command:
      brew install svgo
  4. Give the Script Permissions:

    • Run the following command in the terminal, replacing (put here the script path) with the actual path to your script:
      chmod 777 (put here the script path)

Usage

Now, create a directory and put all of your icons in it, put the script in this directory, then open the terminal in this directory, drag the script in the terminal then press enter.

Screen.Recording.2024-03-03.at.7.25.30.AM.mov

Now, you can upload the refined icons to the FlutterIcon website and they will appear as expected.

We welcome contributions for additional platform setups like Windows ..etc. Happy refining! 🚀