loadFromString static method

Future<Svg> loadFromString(
  1. String svgString, {
  2. double? pixelRatio,
})

Loads an Svg from a string.

Implementation

static Future<Svg> loadFromString(
  String svgString, {
  double? pixelRatio,
}) async {
  final pictureInfo = await vg.loadPicture(SvgStringLoader(svgString), null);
  return Svg(
    pictureInfo,
    pixelRatio: pixelRatio,
  );
}