SvgAssetLoader class

Inheritance

Constructors

SvgAssetLoader(String assetName, {String? packageName, AssetBundle? assetBundle, SvgTheme? theme, ColorMapper? colorMapper})
Creates an instance of SvgAssetLoader for loading SVG assets.
const

Properties

assetBundle AssetBundle?
The optional asset bundle to use; defaults to DefaultAssetBundle if null.
final
assetName String
The name of the asset to load, e.g., 'foo.svg'.
final
colorMapper ColorMapper?
The ColorMapper used to transform colors from the SVG, if any.
finalinherited
hashCode int
The hash code for this object.
no setteroverride
packageName String?
The optional package containing the asset.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
theme SvgTheme?
The theme to determine currentColor and font sizing attributes.
finalinherited

Methods

cacheKey(BuildContext? context) SvgCacheKey
Creates a cache key for the SVG loader.
override
getTheme(BuildContext? context) SvgTheme
Returns the SVG theme.
inherited
loadBytes(BuildContext? context) Future<ByteData>
Loads the SVG bytes, utilizing caching to avoid unnecessary repeated loads.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
prepareMessage(BuildContext? context) Future<ByteData?>
Prepares the message to be used for loading the SVG asset. Returns the ByteData of the loaded asset.
override
provideSvg(ByteData? message) String
Provides the SVG string from the loaded ByteData.
override
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override