仲間のダーツプログラマー。
以下のように Stream を使用してファイルを読み込んでいます。
Stream<List<int>> stream = new File(filepath).openRead();
stream
.transform(UTF8.decoder)
.transform(const LineSpilitter())
.listen((line){
// TODO: check if this is the last line of the file
var isLastLine;
});
listen() の行がファイルの最後の行かどうかを確認したい。