appendString method

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

Appends a string to the content of this file using UTF-8 or the specified encoding.

Implementation

Future<void> appendString(String string, {Encoding encoding = utf8}) async {
  final raf = await open(mode: FileMode.writeOnlyAppend);
  await raf.writeString(string);
  await raf.close();
}