flush method
Force any buffered writes to flush. Called by the runner before exiting.
Implementation
@override
Future<void> flush() async {
final inflight = _inflightFlush;
if (inflight != null) await inflight;
if (_pendingWrites.isNotEmpty) await _doFlush();
}