runProcess method
Implementation
Future<void> runProcess(String executable, List<String> arguments,
{required String workingDirectory}) async {
final proc = await Process.start(
executable,
arguments,
runInShell: true,
workingDirectory: workingDirectory,
);
await stdout.addStream(proc.stdout);
await stderr.addStream(proc.stderr);
final exitCode = await proc.exitCode;
if (exitCode != 0) {
stderr.write(proc.stderr);
print('Failed to create Flutter package:');
exit(1);
}
}