SvgLoader<T> class abstract

A BytesLoader that resolves an SVG document and caches its UTF-8 source.

Inheritance
Implementers
Annotations

Constructors

SvgLoader({SvgTheme? theme, ColorMapper? colorMapper})
See class doc.
const

Properties

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

Methods

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

Operators

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