NetworkPicture class
Fetches the given URL from the network, associating it with the given scale.
The picture will be cached regardless of cache headers from the server.
See also:
- SvgPicture.network for a shorthand of an SvgPicture widget backed by NetworkPicture.
- Inheritance
-
- Object
- PictureProvider<
NetworkPicture> - NetworkPicture
Constructors
-
NetworkPicture(PictureInfoDecoderBuilder<
Uint8List> decoderBuilder, String url, {Map<String, String> ? headers, ColorFilter? colorFilter}) - Creates an object that fetches the picture at the given URL.
Properties
- colorFilter → ColorFilter?
-
The color filter to apply to the picture, if any.
finalinherited
- currentColor ↔ Color?
-
The default color applied to SVG elements that inherit the color property.
getter/setter pairinherited-getteroverride-setter
-
decoder
↔ PictureInfoDecoder<
Uint8List> -
The decoder to use to turn a Uint8List into a PictureInfo object.
getter/setter pair
-
decoderBuilder
→ PictureInfoDecoderBuilder<
Uint8List> -
The decoder builder to build a decoder when currentColor changes.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
-
headers
→ Map<
String, String> ? -
The HTTP headers that will be used with HttpClient.get to fetch picture from network.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- url → String
-
The URL from which the picture will be fetched.
final
Methods
-
load(
NetworkPicture key, {PictureErrorListener? onError}) → PictureStreamCompleter -
Converts a key into an PictureStreamCompleter, and begins fetching the
picture.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
obtainKey(
PictureConfiguration picture) → Future< NetworkPicture> -
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 -
A string representation of this object.
override
Operators
-
operator ==(
dynamic other) → bool -
The equality operator.
override