payload property
Implementation
@override
Uint8List? get payload {
if (version.value < 0x12 && errorRecordList.isNotEmpty) {
throw ArgumentError(
"Encoding error record version ${version.value} is not supported");
}
return super.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]);
}
}
}