readSvg static method

Future<XmlDocument> readSvg(
  1. String filePath, {
  2. dynamic isTest = false,
})

Implementation

static Future<XmlDocument> readSvg(String filePath, {isTest = false}) async {
  String path = filePath;
  if(filePath.contains("http")){
    path = await downloadFile(filePath);
  }
  var content = await readFile(path, isTest: isTest);
  var xmlRoot = XmlDocument.parse(content);
  return xmlRoot;
}