Use Process.start() to start a process to run an executable. This function returns a new process that you can use to interact with the original process. You can use this returned process to obtain the exit code from executing the original process.
 import 'dart:io';
main() async {
  var process = await Process.start('ls', ['-l']);
  // Get the exit code from the new process.
  var exitCode = await process.exitCode;
  print('exit code: $exitCode');
} 
      
        声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did129471