Dart :: Process.run() get stdout as stream instead of String, just like Process.start() - Stack Overflow

PHOTO EMBED

Fri Jul 15 2022 09:14:54 GMT+0000 (UTC)

Saved by @X17 #dart

void main() async {
  final p = await Process.start('bash', ['-c', 'sleep 3']);
  await stdout.addStream(p.stdout);
  print('the end 😎');
}
content_copyCOPY

https://stackoverflow.com/questions/67338711/dart-process-run-get-stdout-as-stream-instead-of-string-just-like-process