ByteArray constructor

ByteArray([
  1. List<int>? buffer
])

Implementation

ByteArray([List<int>? buffer]) {
  if (buffer != null) {
    _bytes = Uint8Buffer(buffer.length);
    _bytes.setAll(0, buffer);
  } else {
    _bytes = Uint8Buffer(0);
  }
  _data = ByteData.view(_bytes.buffer);
}