getMap method

Map getMap(
  1. String data
)
inherited

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;
}