getMap method
Implementation
Map getMap(String data) {
String command = data;
command = command.replaceAll("\r", "").replaceAll("\n", "");
List<String> lines = command.split(";");
Map maps = Map();
lines.forEach((line) {
if (line.contains("=")) {
List<String> keyValue = line.split("=");
if (keyValue.length >= 2) {
maps.putIfAbsent(keyValue[0].trim().replaceAll("var ", ""),
() => keyValue[1].trim().replaceAll('"', ""));
}
}
});
return maps;
}