NDEFRecord constructor
NDEFRecord({
- TypeNameFormat? tnf,
- Uint8List? type,
- Uint8List? id,
- Uint8List? payload,
Implementation
NDEFRecord(
{TypeNameFormat? tnf, Uint8List? type, this.id, Uint8List? payload}) {
flags = NDEFRecordFlags();
if (tnf == null) {
flags.TNF = TypeNameFormat.values.indexOf(this.tnf);
} else {
if (this.tnf != TypeNameFormat.empty) {
throw ArgumentError("TNF has not been set in subclass of Record");
}
this.tnf = tnf;
}
this.type = type;
// some subclasses' setters require payload != null
if (payload != null) {
this.payload = payload;
}
}