AvdPicture.string constructor

AvdPicture.string(
  1. String bytes, {
  2. bool matchTextDirection = false,
  3. bool allowDrawingOutsideViewBox = false,
  4. WidgetBuilder? placeholderBuilder,
  5. Color? color,
  6. BlendMode colorBlendMode = BlendMode.srcIn,
  7. Key? key,
})

Draws an AvdPicture from a raw string of XML.

Implementation

AvdPicture.string(String bytes,
    {bool matchTextDirection = false,
    bool allowDrawingOutsideViewBox = false,
    WidgetBuilder? placeholderBuilder,
    Color? color,
    BlendMode colorBlendMode = BlendMode.srcIn,
    Key? key})
    : this(
          StringPicture(
            allowDrawingOutsideViewBox == true
                ? (_) => avdStringDecoderOutsideViewBox
                : (_) => avdStringDecoder,
            bytes,
          ),
          colorFilter: _getColorFilter(color, colorBlendMode),
          matchTextDirection: matchTextDirection,
          allowDrawingOutsideViewBox: allowDrawingOutsideViewBox,
          placeholderBuilder: placeholderBuilder,
          key: key);