start function

Future<void> start(
  1. String exec,
  2. List<String> args
)

Implementation

Future<void> start(String exec, List<String> args) async {
  Process process = await Process.start(
    exec,
    args,
    runInShell: true,
    mode: ProcessStartMode.inheritStdio,
  );

  process.exitCode.then((_) {
    exit(0);
  });
}