StringPicture class
Decodes the given String as a picture, associating it with the given scale.
The provided String should not be changed after it is provided to a StringPicture. To provide an PictureStream that represents a picture that changes over time, consider creating a new subclass of PictureProvider whose load method returns a subclass of PictureStreamCompleter that can handle providing multiple pictures.
See also:
- SvgPicture.string for a shorthand of an SvgPicture widget backed by StringPicture.
- Inheritance
-
- Object
- PictureProvider<
StringPicture> - StringPicture
Constructors
-
StringPicture(PictureInfoDecoderBuilder<
String> decoderBuilder, String string, {ColorFilter? colorFilter}) - Creates an object that decodes a Uint8List buffer as a picture.
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<
String> -
The PictureInfoDecoder to use for decoding this picture.
getter/setter pair
-
decoderBuilder
→ PictureInfoDecoderBuilder<
String> -
The decoder builder to build a decoder when currentColor changes.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- string → String
-
The string to decode into a picture.
final
Methods
-
load(
StringPicture 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< StringPicture> -
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