Flushes the buffer, ensuring all written data is actually written.
Future<void> flush() => _writer.flush();