Answers for "dart read file line by line"

0

dart read file line by line

import 'dart:async';
import 'dart:io';
import 'dart:convert';

main() {
  var path = ...;
  new File(path)
    .openRead()
    .map(utf8.decode)
    .transform(new LineSplitter())
    .forEach((l) => print('line: $l'));
}
Posted by: Guest on March-24-2021

Browse Popular Code Answers by Language