payload property

  1. @override
Uint8List? get payload
override

Implementation

@override
Uint8List? get payload {
  var payload = [errorNum] + errorData;
  return Uint8List.fromList(payload);
}
  1. @override
set payload (Uint8List? payload)
override

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);
  }
}