writeLine method
Writes a line of text to the buffer.
This method writes the specified string followed by a line separator. The line separator is platform-dependent and is obtained from the underlying writer.
Implementation
@override
Future<void> writeLine([String? str]) async {
if (str != null) {
await write(str);
}
await write('\n'); // Using \n as the default line separator
}