payload property

  1. @override
Uint8List? get payload
override

Implementation

@override
Uint8List? get payload {
  Uint8List? payload = <int?>[] as Uint8List;
  for (var e in attributes.entries) {
    payload.add(e.value.length + 1);
    payload.add(EIR.typeNumMap[e.key!]!);
    payload.addAll(e.value);
  }
  return Uint8List.fromList(payload);
}
  1. @override
set payload (Uint8List? payload)
override

Implementation

@override
set payload(Uint8List? payload) {
  var stream = ByteStream(payload!);
  while (!stream.isEnd()) {
    var length = stream.readByte();
    var data = stream.readBytes(length);
    attributes[EIR.numTypeMap[data[0]]] = data.sublist(1);
  }
}