ndef library
Classes
- AARRecord
- AbsoluteUriRecord
- ActionRecord
- AlternativeCarrierRecord
- ByteStream
- byte stream utility class for decoding
- ByteUtils
- Utility class to play with raw bytes
- CollisionResolutionRecord
- DataElement
- DeviceInformationRecord
- ErrorRecord
- HandoverCarrierRecord
- HandoverInitiateRecord
- HandoverMediationRecord
- HandoverRecord
- HandoverRequestRecord
- HandoverSelectRecord
- MimeRecord
- NDEFRecord
- The base class of all types of records. Also represents an record of unknown type.
- NDEFRecordFlags
- Represent the flags in the header of a NDEF record.
- SignatureRecord
- Signature Record is used to protect the integrity and authenticity of NDEF Messages.
- SizeRecord
- SmartPosterRecord
- TextRecord
- TypeRecord
- UriRecord
- Version
- utility class to present protocal version in the records
Enums
- Action
- CarrierPowerState
- Endianness
- Represent an endianness
- ErrorReason
- TextEncoding
- TypeNameFormat
- The TNF field of a NDEF record.
Extensions
- BigIntConvert on BigInt
- Extension to convert Hex String to other types
- BoolConvert on bool
- Extension to convert bool to int
- BytesConvert on Uint8List
- Extension to convert Uint8List (Bytes) to other types
- HexStringConvert on String
- Extension to convert Hex String to other types
- IntConvert on int
- Extension to convert int to other types, a int can be a single byte or multiple bytes
Functions
-
decodePartialNdefMessage(
TypeNameFormat tnf, Uint8List type, Uint8List payload, {Uint8List? id}) → NDEFRecord - Decode a NDEF record, providing its parts separately. This is most useful in mobile environment because the APIs will give you these information in a separate manner.
-
decodeRawNdefMessage(
Uint8List data, {dynamic typeFactory = NDEFRecord.defaultTypeFactory}) → List< NDEFRecord> - Decode raw NDEF messages (containing at least one NDEFRecord) from byte array
-
encodeNdefMessage(
List< NDEFRecord> records, {bool canonicalize = true}) → Uint8List -
Encode an NDEF message (containing several NDEFRecords) to byte array.
Set
canonicalize
to set the MB and ME fields automatically in the first / last record.
Typedefs
- TypeFactory = NDEFRecord Function(TypeNameFormat tnf, String classType)
-
Construct an instance of a specific type (subclass) of NDEFRecord according to
tnf
andclassType