flush method Null safety

  1. @override
void flush()
override

Implementation

@override
void flush() {
  if (_bufferPosition > 0) {
    if (_isOpen) {
      _fp.writeFromSync(_buffer, 0, _bufferPosition);
    }
    _bufferPosition = 0;
  }
}