NDEFRecord class

The base class of all types of records. Also represents an record of unknown type.

Implementers

Constructors

NDEFRecord({TypeNameFormat? tnf, Uint8List? type, Uint8List? id, Uint8List? payload})
Constructs an NDEFRecord with optional tnf, type, id, and payload.

Properties

basicInfoString → String
Gets a basic information string containing ID, TNF, and type.
no setter
decodedType ↔ String?
Gets the type as a decoded UTF-8 string.
getter/setter pair
encodedType ↔ Uint8List?
The raw encoded type bytes.
getter/setter pair
flags ↔ NDEFRecordFlags
The flags header of the record.
getter/setter pair
fullType → String?
Gets the full qualified type including TNF prefix.
no setter
hashCode → int
The hash code for this object.
no setterinherited
id ↔ Uint8List?
The ID of the record (optional).
getter/setter pair
idString ↔ String
Hex String of id, return "(empty)" when the id bytes is null
getter/setter pair
maxPayloadLength → int?
Gets the maximum payload length for this record instance.
no setter
minPayloadLength → int
Gets the minimum payload length for this record instance.
no setter
payload ↔ Uint8List?
The payload data of the record.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tnf ↔ TypeNameFormat
Gets the Type Name Format of this record.
getter/setter pair
type ↔ Uint8List?
Gets the type as raw bytes.
getter/setter pair

Methods

encode() → Uint8List
Encode this NDEFRecord to raw byte data.
isEqual(NDEFRecord other) → bool
Checks if this record is equal to other by comparing TNF, type, ID, and payload.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

decodeStream(ByteStream stream, TypeFactory typeFactory) → NDEFRecord
Decode a NDEF NDEFRecord from part of ByteStream.
defaultTypeFactory(TypeNameFormat tnf, String classType) → NDEFRecord
Construct an instance of a specific type (subclass) of NDEFRecord according to tnf and type
doDecode(TypeNameFormat tnf, Uint8List type, Uint8List payload, {Uint8List? id, TypeFactory typeFactory = NDEFRecord.defaultTypeFactory}) → NDEFRecord
Decode a NDEFRecord record from raw data.

Constants

classMaxPayloadLength → const int?
The maximum payload length for this record type, null means no limit.
classMinPayloadLength → const int
The minimum payload length for this record type.
classTnf → const TypeNameFormat?
Predefined TNF of a specific record type.
tnfString → const List<String>
String representations of the TNF values.