This question is a continuation of a previous question. I wrote the following piece of code to determine if File.openRead()
created a Stream that could be stre
If a stream is necessary, you can create it from the future that readAsLines()
returns:
Stream> stream =
new Stream.fromFuture(new File('Data.txt').readAsLines());
However it looks simpler to me to plainly process the lines one by one,
List lines = new File('Data.txt').readAsLinesSync();
for (var line in lines) {
stdout.writeln(line);
}