readUntil method
read bytes until a specific byte being seen the specific byte is not included
Implementation
Uint8List readUntil(int byte) {
BytesBuilder builder = BytesBuilder();
int b;
do {
b = data[_currentPosition + 1];
builder.addByte(b);
_currentPosition++;
} while (b != byte && _currentPosition < data.lengthInBytes);
return builder.toBytes();
}