openProcess static method

Future<ProcessResult?> openProcess(
  1. String command, {
  2. List<String>? args,
  3. bool runInShell = true,
})

Implementation

static Future<ProcessResult?> openProcess(String command,
    {List<String>? args, bool runInShell = true}) async {
  try {
    if (args != null) {
      return await Process.run(command, args, runInShell: runInShell);
    } else {
      return await Process.run(command, [], runInShell: runInShell);
    }
  } catch (error, stackTrace) {
    UtilsSentry.reportError(error, stackTrace);
    return null;
  }
}