CodedBufferReader constructor Null safety

CodedBufferReader(
  1. List<int> buffer,
  2. {int recursionLimit = DEFAULT_RECURSION_LIMIT,
  3. int sizeLimit = DEFAULT_SIZE_LIMIT}
)

Implementation

CodedBufferReader(List<int> buffer,
    {int recursionLimit = DEFAULT_RECURSION_LIMIT,
    int sizeLimit = DEFAULT_SIZE_LIMIT})
    : _buffer = buffer is Uint8List ? buffer : Uint8List.fromList(buffer),
      _recursionLimit = recursionLimit,
      _sizeLimit = math.min(sizeLimit, buffer.length) {
  _currentLimit = _sizeLimit;
}