readBytes method
Read count bytes starting at offset. Returns fewer bytes if EOF.
Implementation
@override
Future<Uint8List> readBytes(int offset, int count) async {
await _raf.setPosition(offset);
final data = await _raf.read(count);
if (data.length < count) {
final buf = Uint8List(count);
buf.setAll(0, data);
return buf;
}
return Uint8List.fromList(data);
}