writeLines function
Write lines content. Does not fail
Uses CR/LF if useCrLf
is true or if null and on windows
Implementation
Future<File> writeLines(File file, List<String> lines,
{Encoding encoding = utf8, bool? useCrLf}) {
if (lines.isEmpty) {
return writeString(file, '', encoding: encoding);
}
var lf = (useCrLf ?? platformIsIoWindows) ? '\r\n' : '\n';
return writeString(file, '${lines.join(lf)}$lf', encoding: encoding);
}