AvdPicture.asset constructor

AvdPicture.asset(
  1. String assetName, {
  2. Key? key,
  3. bool matchTextDirection = false,
  4. AssetBundle? bundle,
  5. String? package,
  6. bool allowDrawingOutsideViewBox = false,
  7. WidgetBuilder? placeholderBuilder,
  8. Color? color,
  9. BlendMode colorBlendMode = BlendMode.srcIn,
})

Draws an AvdPicture from an asset.

Implementation

AvdPicture.asset(String assetName,
    {Key? key,
    bool matchTextDirection = false,
    AssetBundle? bundle,
    String? package,
    bool allowDrawingOutsideViewBox = false,
    WidgetBuilder? placeholderBuilder,
    Color? color,
    BlendMode colorBlendMode = BlendMode.srcIn})
    : this(
          ExactAssetPicture(
            allowDrawingOutsideViewBox == true
                ? (_) => avdStringDecoderOutsideViewBox
                : (_) => avdStringDecoder,
            assetName,
            bundle: bundle,
            package: package,
          ),
          colorFilter: _getColorFilter(color, colorBlendMode),
          matchTextDirection: matchTextDirection,
          allowDrawingOutsideViewBox: allowDrawingOutsideViewBox,
          placeholderBuilder: placeholderBuilder,
          key: key);