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

PHOTO EMBED

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

Saved by @X17 #dart

main() async {
  var process = await Process.start('cat', []);
  process.stdout
      .transform(utf8.decoder)
      .forEach(print);
  process.stdin.writeln('Hello, world!');
  process.stdin.writeln('Hello, galaxy!');
  process.stdin.writeln('Hello, universe!');
}
content_copyCOPY

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