飞镖程序员。
我正在使用 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() 中的行是否是文件的最后一行。