BinaryReader.fromByteData constructor
BinaryReader.fromByteData(
- ByteData data
Implementation
factory BinaryReader.fromByteData(ByteData data) {
Uint8List u8 = Uint8List(data.lengthInBytes);
// copy to Uint8List
for (int i = 0; i < data.lengthInBytes; i++) {
u8[i] = data.getUint8(i);
}
return BinaryReader(bytes:u8);
}