appendStringSync method

void appendStringSync(
  1. String value, {
  2. Encoding encoding = utf8,
})

Appends value string at the end of the file using provided encoding.

Implementation

void appendStringSync(String value, {Encoding encoding = utf8}) {
  final fileAccess = openSync(mode: FileMode.writeOnlyAppend);
  fileAccess.writeStringSync(value, encoding: encoding);
  fileAccess.closeSync();
}