flutter_svg library

Classes

AssetBundlePictureKey
Key for the picture obtained by an AssetPicture or ExactAssetPicture.
AssetBundlePictureProvider
A subclass of PictureProvider that knows about AssetBundles.
DefaultSvgTheme
The SVG theme to apply to descendant SvgPicture widgets which don't have explicit theme values.
Drawable
Base interface for vector drawing.
DrawableDefinitionServer
Contains reusable drawing elements that can be referenced by a String ID.
DrawableGradient
Basic information describing a gradient.
DrawableGroup
Represents a group of drawing elements that may share a common transform, stroke, or fill.
DrawableLinearGradient
Represents the data needed to create a Gradient.linear.
DrawablePaint
A wrapper class for Flutter's Paint class.
DrawableParent
A Drawable that can have child Drawables and DrawableStyle.
DrawableRadialGradient
Represents the information needed to create a Gradient.radial.
DrawableRasterImage
A raster image (e.g. PNG, JPEG, or GIF) embedded in the drawable.
DrawableRoot
The root element of a drawable.
DrawableShape
Represents a drawing element that will be rendered to the canvas.
DrawableStyle
Styling information for vector drawing.
DrawableStyleable
A Drawable that can have a DrawableStyle applied to it.
DrawableText
A Drawable for text objects.
DrawableTextStyle
A wrapper class for Flutter's TextStyle class.
DrawableViewport
Contains the viewport size and offset for a Drawable.
ExactAssetPicture
Fetches a picture from an AssetBundle, associating it with the given scale.
FilePicture
Decodes the given File object as a picture, associating it with the given scale.
MemoryPicture
Decodes the given String buffer as a picture, associating it with the given scale.
NetworkPicture
Fetches the given URL from the network, associating it with the given scale.
OneFramePictureStreamCompleter
Manages the loading of dart:ui.Picture objects for static PictureStreams (those with only one frame).
PictureConfiguration
Configuration information passed to the PictureProvider.resolve method to select a specific picture.
PictureInfo
Represents information about a ui.Picture to be drawn on a canvas.
PictureProvider<T>
Identifies a picture without committing to the precise final asset. This allows a set of pictures to be identified and for the precise picture to later be resolved based on the environment, e.g. the device pixel ratio.
PictureStream
A handle to an image resource.
PictureStreamCompleter
Base class for those that manage the loading of dart:ui.Picture objects for PictureStreams.
StringPicture
Decodes the given String as a picture, associating it with the given scale.
Svg
A utility class for decoding SVG data to a DrawableRoot or a PictureInfo.
SvgPicture
A widget that will parse SVG data into a Picture using a PictureProvider.
SvgTheme
A theme used when decoding an SVG picture.

Enums

DrawableTextAnchorPosition
How to anchor text.
GradientUnitMode
Determines how to transform the points given for a gradient.

Properties

svg Svg
Instance for Svg's utility methods, which can produce a DrawableRoot or PictureInfo from String or Uint8List.
final

Functions

createLocalPictureConfiguration(BuildContext? context, {Rect? viewBox, ColorFilter? colorFilterOverride, Color? color, BlendMode? colorBlendMode}) PictureConfiguration
Creates an PictureConfiguration based on the given BuildContext (and optionally size).
precachePicture(PictureProvider provider, BuildContext? context, {Rect? viewBox, ColorFilter? colorFilterOverride, Color? color, BlendMode? colorBlendMode, PictureErrorListener? onError}) Future<void>
Prefetches an SVG Picture into the picture cache.

Typedefs

PictureErrorListener = void Function(Object exception, StackTrace stackTrace)
The signature of a method that listens for errors on picture stream resolution.
PictureInfoDecoder<T> = Future<PictureInfo> Function(T data, ColorFilter? colorFilter, String key)
The signature of a function that can decode raw SVG data into a Picture.
PictureInfoDecoderBuilder<T> = PictureInfoDecoder<T> Function(Color? currentColor)
The signature of a builder that returns a PictureInfoDecoder based on the currentColor.
PictureListener = dynamic Function(PictureInfo? image, bool synchronousCall)
Signature for callbacks reporting that an image is available.