Crates.io | flatter |
lib.rs | flatter |
version | 0.1.0 |
source | src |
created_at | 2021-08-05 20:43:46.087968 |
updated_at | 2021-08-05 20:43:46.087968 |
description | A command line utility for rendering PNGs from SVGs |
homepage | https://github.com/cameron1024/flatter |
repository | https://github.com/cameron1024/flatter |
max_upload_size | |
id | 432177 |
size | 5,576,807 |
A command line utility for rendering SVGs to PNGs for Flutter applications.
Flutter does not natively support SVGs, and 3rd-party packages to provide SVG support have historically had issues with certain types of SVGs.
Often, however, SVGs are available ahead of time (e.g. provided by a designer) and can be "flattened" into PNGs, which Flutter natively supports. Flatter aims to provide a fast, accurate, and repeatable renders of static SVGs, optimized for this use case.
flatter --input path/to/svgs --output flutter_app/assets/images --scales 1 2 3 4
Generate 1x, 2x, 3x, 4x versions of each SVG in path/to/svgs
, and write them to flutter_app/assets/images
Got feedback? Suggestions? Improvements? Issues? Feel free to file an issue or submit a PR and I'll be happy to take a look!