setEnvironmentVariable method

Future<void> setEnvironmentVariable(
  1. String variableName,
  2. String variableValue
)

Sets an environment variable.

Implementation

Future<void> setEnvironmentVariable(
    String variableName, String variableValue) async {
  try {
    var parameters = {
      'variableName': variableName,
      'variableValue': variableValue
    };
    await _methodChannel.invokeMethod('setEnvironmentVariable', parameters);
  } on PlatformException catch (e) {
    logger.e('Plugin setEnvironmentVariable error: ${e.message}');
  }
}