fromSvgString method

Future<DrawableRoot> fromSvgString(
  1. String rawSvg,
  2. String key, {
  3. SvgTheme theme = const SvgTheme(),
})

Creates a DrawableRoot from a string of SVG data.

The key is used for debugging purposes.

Implementation

Future<DrawableRoot> fromSvgString(
  String rawSvg,
  String key, {
  SvgTheme theme = const SvgTheme(),
}) async {
  final SvgParser parser = SvgParser();
  return await parser.parse(rawSvg, theme: theme, key: key);
}