classInstantiate method

  1. @override
String classInstantiate(
  1. AssetType asset
)
override

Implementation

@override
String classInstantiate(AssetType asset) {
  // Query extra information about the SVG
  ImageMetadata? info = parseMetadata ? _getMetadata(asset) : null;

  final String constructorName =
      asset.extension == '.vec' ? 'SvgGenImage.vec' : 'SvgGenImage';

  return "$constructorName('${asset.posixStylePath}'"
      "${(info != null) ? ', size: Size(${info.width}, ${info.height})' : ''}"
      ')';
}