readByteDataImmutable method

Future<ByteData> readByteDataImmutable(
  1. int num
)

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);
}