Skip to content
pubscout

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.

WASM-readyRock solid
$ flutter pub add vector_graphics_compiler
Source repository

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 documented

Alternatives

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.

  • full_svg_flutter

    Complete SVG runtime for Flutter with support for static vectors, SMIL, CSS, and filters.

  • cached_network_svg_image

    Load and cache SVG images from the network in Flutter

  • widgets_to_image

    Convert any Flutter widget into high-quality images with customizable formats and settings.

Works with

Packages commonly used together with vector_graphics_compiler: ones it builds on, ones built on it, and its own family.