flush method
Flushes any buffered backend output.
Implementation
@override
Future<void> flush() {
final existing = _stdoutFlushInFlight;
if (existing != null) return existing;
final future = _flushStdoutAll();
_stdoutFlushInFlight = future.whenComplete(() {
_stdoutFlushInFlight = null;
});
return _stdoutFlushInFlight!;
}