readByteDataImmutable method
Returns a potentially immutable ByteData containing the desired number of bytes.
Implementation
Future<ByteData> readByteDataImmutable(int num) async {
final bytes = await readBytesImmutable(num);
return bytes.buffer.asByteData(bytes.offsetInBytes, num);
}