NdefRecord constructor
NdefRecord({
- required NdefTypeNameFormat typeNameFormat,
- required Uint8List type,
- required Uint8List identifier,
- required Uint8List payload,
Constructs an instance with the given values.
Recommend to use other factory constructors such as createText
or createUri
where possible,
since they will ensure that the records are formatted correctly according to the NDEF specification.
Implementation
factory NdefRecord({
required NdefTypeNameFormat typeNameFormat,
required Uint8List type,
required Uint8List identifier,
required Uint8List payload,
}) {
_validateFormat(typeNameFormat, type, identifier, payload);
return NdefRecord._(
typeNameFormat: typeNameFormat,
type: type,
identifier: identifier,
payload: payload,
);
}