AdvancedNetworkSvg class

Fetches the given URL from the network, associating it with some options.

Constructors

AdvancedNetworkSvg(String url, PictureInfoDecoderBuilder<Uint8List?> decoder, {double scale = 1.0, Map<String, String>? header, ColorFilter? colorFilter, bool useDiskCache = false, int retryLimit = 5, Duration retryDuration = const Duration(milliseconds: 500), double retryDurationFactor = 1.5, Duration timeoutDuration = const Duration(seconds: 5), Function? loadedCallback, Function? loadFailedCallback, String? fallbackAssetImage, Uint8List? fallbackImage, CacheRule? cacheRule, UrlResolver? getRealUrl, bool printError = false, List<int>? skipRetryStatusCode})

Properties

cacheRule CacheRule?
Disk cache rules for advanced control.
final
colorFilter ColorFilter?
The ColorFilter, if any, to apply to the drawing.
final
decoder ↔ PictureInfoDecoder<Uint8List?>
The PictureInfoDecoder to use for loading this picture.
getter/setter pairinherited
decoderBuilder → PictureInfoDecoderBuilder<Uint8List?>
The decoder builder to build a decoder when theme changes.
finalinherited
fallbackAssetImage String?
Displays image from an asset bundle when the image failed to load.
final
fallbackImage Uint8List?
The image will be displayed when the image failed to load and fallbackAssetImage is null.
final
getRealUrl → UrlResolver?
Extract the real url before fetching.
final
hashCode int
The hash code for this object.
no setteroverride
The HTTP headers that will be used with http to fetch image from network.
final
loadedCallback Function?
The callback will be executed when the image loaded.
final
loadFailedCallback Function?
The callback will be executed when the image failed to load.
final
printError bool
Print error messages.
final
retryDuration Duration
The retry duration will give the interval between the retries.
final
retryDurationFactor double
Apply factor to control retry duration between retry.
final
retryLimit int
The retry limit will be used to limit the retry attempts.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scale double
The scale to place in the ImageInfo object of the image.
final
skipRetryStatusCode List<int>?
The HttpStatus code that you can skip retrying if you meet them.
final
theme ↔ SvgTheme
The default theme used when parsing SVG elements.
getter/setter pairinherited
timeoutDuration Duration
The timeout duration will give the timeout to a fetching function.
final
url String
The URL from which the image will be fetched.
final
useDiskCache bool
The flag control the disk cache will be used or not.
final

Methods

decode(Uint8List? imageData, ColorFilter? colorFilter, String keyString, {PictureErrorListener? onError}) Future<PictureInfo>
evict({bool disk = false}) Future<bool>
load(AdvancedNetworkSvg key, {PictureErrorListener? onError}) → PictureStreamCompleter
Converts a key into an PictureStreamCompleter, and begins fetching the picture.
loadFromDiskCache() Future<Uint8List?>
Load the disk cache
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
obtainKey(PictureConfiguration picture) Future<AdvancedNetworkSvg>
Converts a pictureProvider's settings plus a pictureConfiguration to a key that describes the precise picture to load.
resolve(PictureConfiguration picture, {PictureErrorListener? onError}) → PictureStream
Resolves this Picture provider using the given configuration, returning an PictureStream.
inherited
toString() String
A string representation of this object.

Operators

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