AdvancedNetworkSvg class

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

Inheritance

Constructors

AdvancedNetworkSvg(String url, PictureInfoDecoder<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})
const

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 decoder provided by flutter_svg (svgByteDecoder or svgByteDecoderOutsideViewBox)
final
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. [...]
read-only, override
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.
read-only, inherited
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
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>
load(AdvancedNetworkSvg key, {PictureErrorListener onError}) PictureStreamCompleter
Converts a key into an PictureStreamCompleter, and begins fetching the picture.
override
loadFromDiskCache() Future<Uint8List>
Load the disk cache [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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. [...]
override
resolve(PictureConfiguration picture, {PictureErrorListener onError}) PictureStream
Resolves this Picture provider using the given configuration, returning an PictureStream. [...]
inherited
toString() String
Returns a string representation of this object.
override

Operators

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