flutter_svg library
Classes
- BytesLoader
- Resolves the raw bytes of an SVG document for an SvgPicture.
- Cache
- The cache for decoded SVGs.
- CacheStats
- Statistics for cache profiling and diagnostics.
- ColorMapper
- A class that transforms one color into another during SVG parsing.
- DefaultSvgTheme
- The SVG theme to apply to descendant SvgPicture widgets which don't have explicit theme values.
- FSvgPicture
- A unified SVG widget that auto-selects static or animated rendering.
- PictureInfo
- A rendered SVG picture together with its natural size.
- PictureProvider
- Deprecated class, will be removed, does not do anything.
- Svg
-
A utility class for decoding SVG data to a
DrawableRootor a PictureInfo. - SvgAssetLoader
- A BytesLoader that resolves an SVG from an asset bundle.
- SvgBytesLoader
- A BytesLoader that resolves an SVG from a UTF-8 encoded Uint8List.
- SvgCacheKey
- A theme- and color-mapper-aware cache key.
- SvgFileLoader
- A BytesLoader that resolves an SVG from a file.
-
SvgLoader<
T> - A BytesLoader that resolves an SVG document and caches its UTF-8 source.
- SvgNetworkLoader
- A BytesLoader that resolves an SVG from the network.
- SvgPicture
- A widget that will parse SVG data for rendering on screen.
- SvgStringLoader
- A BytesLoader that resolves an SVG from a raw string.
- SvgTheme
- A theme used when decoding and rendering an SVG picture.
Enums
- RenderingStrategy
- The strategy used to render an SVG widget.
Properties
Functions
-
renderSvgToPicture(
String rawSvg, {Size? size, SvgTheme? theme, ColorMapper? colorMapper}) → PictureInfo -
Parses
rawSvgand records it into a ui.Picture. -
svgIntrinsicSize(
SvgDocument document) → Size -
Returns the intrinsic size of
documentin logical pixels.
Typedefs
- SvgErrorWidgetBuilder = Widget Function(BuildContext context, Object error, StackTrace stackTrace)
- Builder function to create an error widget. This builder is called when the image failed loading.