appendStringLine method

Future<void> appendStringLine(
  1. String value, {
  2. Encoding encoding = utf8,
})

Appends value string as a new line at the end of the file using provided encoding.

Implementation

Future<void> appendStringLine(String value,
    {Encoding encoding = utf8}) async {
  final sink = openWrite(mode: FileMode.writeOnlyAppend, encoding: encoding);
  sink.writeln(value);
  await sink.close();
}