payload property

  1. @override
Uint8List? get payload
override

Implementation

@override
Uint8List? get payload {
  var data = encodeNdefMessage(allRecordList);
  // cast() 's use
  List<int>? payload = ([version.value] + data).cast();
  return Uint8List.fromList(payload);
}
  1. @override
set payload (Uint8List? payload)
override

Implementation

@override
set payload(Uint8List? payload) {
  version = Version(value: payload![0]);
  if (payload.length > 1) {
    var records =
        decodeRawNdefMessage(payload.sublist(1), typeFactory: _typeFactory);
    for (int i = 0; i < records.length; i++) {
      addRecord(records[i]);
    }
  }
}