vector_graphics_compiler
1.3.6, released 9 days ago by flutter.dev
A compiler to convert SVGs to the binary format used by package:vector_graphics.
What it does
Parses SVG files and compiles them into an optimized binary format for rendering via the vector_graphics runtime. It handles groups, paths, gradients, text, symbols, images, and patterns while applying several optimization techniques.
AI-written summary of version 1.3.4, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to precompile SVGs into binary format for vector_graphics.
- You want optimized SVG rendering performance in your Flutter application.
Skip it when
- You are parsing SVGs dynamically at runtime without precompilation.
Strengths
- Supports a wide range of SVG features including gradients, text, and patterns.
- Performs optimizations like transformation inlining and group collapsing.
- Protects against security issues like circular references and Billion Laughs exploits.
Weaknesses
- Does not support SVG filters or certain text processing attributes.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 7
Not documented
not documentedAlternatives
Packages that do the same job and could replace vector_graphics_compiler.
- jovial_svg
SVG - Robust rendering of Scalable Vector Graphic images, supporting a well-defined profile of SVG, a fast-loading binary storage format, and animation.
86Compare - full_svg_flutter
Complete SVG runtime for Flutter with support for static vectors, SMIL, CSS, and filters.
83Compare - cached_network_svg_image
Load and cache SVG images from the network in Flutter
57Compare - widgets_to_image
Convert any Flutter widget into high-quality images with customizable formats and settings.
59Compare
Works with
Packages commonly used together with vector_graphics_compiler: ones it builds on, ones built on it, and its own family.
- xmlvector_graphics_compiler depends on itFull-featured XML and XPath library for DOM parsing, SAX streaming, and fluent building.
- argsvector_graphics_compiler depends on itLibrary for parsing raw command-line arguments into options and values using GNU and POSIX styles.
- cli_utilvector_graphics_compiler depends on itUtilities to help build Dart command-line apps, find the SDK, and display progress.
- path_parsingvector_graphics_compiler depends on itPure Dart library for parsing SVG path strings and generating Dart path code.
- vector_graphics_codecvector_graphics_compiler depends on itEncoding and decoding library for the vector_graphics binary format
- vector_mathSame familyVector math library for 2D/3D/4D vectors, matrices, quaternions, and geometry.
- vector_graphicsSame familyA vector graphics rendering package for Flutter using a binary encoding.
- flutter_svgBuilt on vector_graphics_compilerRenders Scalable Vector Graphics (SVG 1.1) and precompiled vector graphics in Flutter.