append method

void append(
  1. String line, {
  2. String? newline,
})

Appends the line to the file Appends newline after the line. If newline is null or isn't passed then the platform end of line characters are appended as defined by Platform().eol. Pass null or an '' to newline to not add a line terminator.

Implementation

void append(String line, {String? newline}) {
  final finalline = line + (newline ?? Platform().eol);

  _raf
    ..setPositionSync(_raf.lengthSync())
    ..writeStringSync(finalline);
}