SvgBytesLoader class

A BytesLoader that resolves an SVG from a UTF-8 encoded Uint8List.

Inheritance

Constructors

SvgBytesLoader(Uint8List bytes, {SvgTheme? theme, ColorMapper? colorMapper})
See class doc.
const

Properties

bytes Uint8List
The UTF-8 encoded XML bytes.
final
colorMapper ColorMapper?
The ColorMapper used to substitute colors in the SVG, if any.
finalinherited
hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
theme SvgTheme?
The theme controlling currentColor and font-relative units.
finalinherited

Methods

cacheKey(BuildContext? context) SvgCacheKey
An object that uniquely identifies the SVG resolved by this loader.
inherited
getTheme(BuildContext? context) SvgTheme
Resolves the effective SvgTheme for this loader.
inherited
loadBytes(BuildContext? context) Future<ByteData>
This method intentionally avoids using await to avoid unnecessary event loop turns. This helps tests in particular.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
prepareMessage(BuildContext? context) Future<void>
Performs any asynchronous work (asset/network/file IO) needed before provideSvg can run.
inherited
provideSvg(void message) String
Returns the SVG source for the prepared message.
override
toString() String
A string representation of this object.
inherited

Operators

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