payload property
Implementation
@override
Uint8List? get payload {
var data = encodeNdefMessage(allRecordList);
// cast() 's use
List<int>? payload = ([version.value] + data).cast();
return Uint8List.fromList(payload);
}
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]);
}
}
}