svg2dart 0.0.8
svg2dart: ^0.0.8 copied to clipboard
A command-line tool to convert SVG files into pure Dart code for Flutter.
Changelog #
0.0.8 #
- FIX: code format.
0.0.7 #
- Added support for
<text>elements in SVG files, allowing for the conversion of text-based graphics into Dart widgets. - Removed support to generate three types of classes for rendering, selectable with the
convertTooption. Now onlyLeafRenderObjectWidgetwith pre-recordedui.Pictureis supported.
0.0.6 #
- FIX: Ensure generated widgets properly clip their content to the specified width and height, preventing overflow issues.
0.0.5 #
- Added the ability to generate three types of classes for rendering, selectable with the
convertTooption:customPainter: Renders the SVG using aCustomPainter.record: Pre-records the SVG into aui.Picturefor optimized performance.renderBox: Renders the SVG directly within aLeafRenderObjectWidget.
- Added a new
optimizationsflag. When enabled, it usespathopsfor path simplification andTessellatorto convert paths into vertices for direct GPU rendering, which can significantly improve performance.
0.0.4 #
- The code generator has been completely rewritten to produce widgets based on
LeafRenderObjectWidgetand a pre-recordedui.Picture. - Generated widgets now accept
widthandheightparameters for direct sizing, similar toflutter_svg. - The generator now detects and skips SVG files that contain
<image>tags, as raster images are not supported. - Updated package description and
README.mdto reflect the new architecture.
0.0.3 #
- Add support for build_runner
0.0.2 #
- Add formatting and fixing functions for SVG output.
- Improve code generation.
0.0.1 #
- Initial release of the package.
- Converts SVG files to Flutter
CustomPainterwidgets. - Supports paths, fills, strokes, and basic gradients.
- Handles single files and entire directories.