SvgNetworkLoader class

A BytesLoader that resolves an SVG from the network.

Inheritance

Constructors

SvgNetworkLoader(String url, {Map<String, String>? headers, SvgTheme? theme, ColorMapper? colorMapper, Client? httpClient})
See class doc.
const

Properties

colorMapper ColorMapper?
The ColorMapper used to substitute colors in the SVG, if any.
finalinherited
hashCode int
The hash code for this object.
no setteroverride
headers Map<String, String>?
Optional HTTP headers to send as part of the request.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
theme SvgTheme?
The theme controlling currentColor and font-relative units.
finalinherited
url String
The Uri encoded resource address.
final

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<Uint8List?>
Performs any asynchronous work (asset/network/file IO) needed before provideSvg can run.
override
provideSvg(Uint8List? message) String
Returns the SVG source for the prepared message.
override
toString() String
A string representation of this object.
override

Operators

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