# setSetting method

Future<bool> setSetting(

1. String distro,
2. String parent,
3. String key,
4. String value

)

Change setting in wsl.conf with key and value

## Implementation

    Future<bool> setSetting(
        String distro, String parent, String key, String value) async {
      // Read trigger script from assets
      String script = await rootBundle.loadString('assets/scripts/settings.bash');
      script = script.replaceAll(RegExp(r'^#.*\n', multiLine: true), '');
      script = script.replaceAll('PARENT', parent);
      script = script.replaceAll('KEY', key);
      script = script.replaceAll('VALUE', value);
      List<String> scriptLines = script.split('\n');

      // Execute trigger script
      await execCmds(distro, scriptLines,
          onMsg: (msg) {}, onDone: () {}, showOutput: false);
      return true;
    }