payload property
Implementation
@override
Uint8List? get payload {
var payload = [errorNum] + errorData;
return Uint8List.fromList(payload);
}
Implementation
@override
set payload(Uint8List? payload) {
ByteStream stream = ByteStream(payload!);
errorNum = stream.readByte();
if (errorNum == 1) {
errorData = stream.readBytes(1);
} else if (errorNum == 2) {
errorData = stream.readBytes(4);
} else if (errorNum == 3) {
errorData = stream.readBytes(1);
} else {
errorData = stream.readBytes(stream.unreadLength);
}
}