getRange method
Get a range of bytes from the input data.
start
and end
are the start and end index of the range.
Such as: start
= 0, end
= 2, then the result is 0, 1
.
Implementation
@override
Future<List<int>> getRange(int start, int end) async {
final data = await byteData;
return Future.value(data.buffer.asUint8List(start, end - start));
}