# readConfig method

Future<Map<String, String>> readConfig()

Read wslconfig file

## Implementation

    Future<Map<String, String>> readConfig() async {
      File file = File(getWslConfigPath());
      if (!file.existsSync()) {
        file.createSync();
      }

      Map<String, String> config = {};
      String key = '', value = '';
      List<String> lines = await file.readAsLines();

      for (var line in lines) {
        if (line.isNotEmpty && line.contains('=')) {
          key = line.substring(0, line.indexOf('='));
          key = key.replaceAll(' ', '');
          value = line.substring(line.indexOf('=') + 1, line.length);
          value = value.replaceAll(' ', '');
          config[key] = value;
        }
      }
      return config;
    }