Use Process.run()
to run a process. The results of the process are returned asynchronously using a ProcessResult object.
import 'dart:io';
main() async {
// List all files in the current directory in UNIX-like operating systems.
var results = await Process.run('ls', ['-l']);
print(results.stdout);
}
扫一扫
在手机上阅读