svgToRegionListNetwork method
Implementation
Future<List<Region>> svgToRegionListNetwork(
String svgAddress, String fileName) async {
var temp = await httpGet(svgAddress, fileName);
final String svgMain = temp.body;
List<Region> regionList = [];
final regExp = RegExp(Constants.mapRegexp,
multiLine: true, caseSensitive: false, dotAll: false);
regExp.allMatches(svgMain).forEach((regionData) {
final region = Region(
id: regionData.group(1)!,
name: regionData.group(2)!,
path: parseSvgPath(regionData.group(3)!));
sizeController.addBounds(region.path.getBounds());
regionList.add(region);
});
return regionList;
}