OutputFileStream constructor Null safety

OutputFileStream(
  1. String path,
  2. {int byteOrder = LITTLE_ENDIAN,
  3. int? bufferSize}
)

Implementation

OutputFileStream(this.path, {this.byteOrder = LITTLE_ENDIAN,
  int? bufferSize})
    : _length = 0
    , _buffer = Uint8List(bufferSize == null ? 8192 : bufferSize < 1 ? 1 :
                          bufferSize)
    , _bufferPosition = 0
    , _isOpen = true {
  final file = File(path);
  file.createSync(recursive: true);
  _fp = file.openSync(mode: FileMode.write);
}