WifiRecord class

A NDEF record for WiFi network configuration (WiFi Simple Configuration).

This record type uses the MIME type "application/vnd.wfa.wsc" and contains WiFi credentials for easy network connection through NFC.

Example:

var wifiRecord = WifiRecord(
  ssid: 'MyNetwork',
  networkKey: 'mypassword',
  authenticationType: WifiAuthenticationType.wpa2Personal,
  encryptionType: WifiEncryptionType.aes,
);
Inheritance

Constructors

WifiRecord({String? ssid, String? networkKey, WifiAuthenticationType authenticationType = WifiAuthenticationType.wpa2Personal, WifiEncryptionType encryptionType = WifiEncryptionType.aes, String? macAddress, int networkIndex = 1, Uint8List? id})
Constructs a WifiRecord with WiFi network credentials.

Properties

authenticationType ↔ WifiAuthenticationType
The authentication type (WPA2, WPA3, etc.)
getter/setter pair
basicInfoString → String
Gets a basic information string containing ID, TNF, and type.
no setterinherited
decodedType ↔ String
Gets the type as a decoded UTF-8 string.
getter/setter pairinherited-setteroverride-getter
encodedType ↔ Uint8List?
The raw encoded type bytes.
getter/setter pairinherited
encryptionType ↔ WifiEncryptionType
The encryption type (AES, TKIP, etc.)
getter/setter pair
flags ↔ NDEFRecordFlags
The flags header of the record.
getter/setter pairinherited
fullType → String?
Gets the full qualified type including TNF prefix.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
id ↔ Uint8List?
The ID of the record (optional).
getter/setter pairinherited
idString ↔ String
Hex String of id, return "(empty)" when the id bytes is null
getter/setter pairinherited
macAddress ↔ String?
Optional MAC address
getter/setter pair
maxPayloadLength → int?
Gets the maximum payload length for this record instance.
no setterinherited
minPayloadLength → int
Gets the minimum payload length for this record instance.
no setterinherited
networkIndex ↔ int
Network index (usually 0x01 for infrastructure networks)
getter/setter pair
networkKey ↔ String?
The WiFi network password/key
getter/setter pair
payload ↔ Uint8List?
The payload data of the record.
getter/setter pairoverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
ssid ↔ String?
The WiFi network SSID (network name)
getter/setter pair
tnf ↔ TypeNameFormat
Gets the Type Name Format of this record.
getter/setter pairinherited
type ↔ Uint8List?
Gets the type as raw bytes.
getter/setter pairinherited

Methods

encode() → Uint8List
Encode this NDEFRecord to raw byte data.
inherited
isEqual(NDEFRecord other) → bool
Checks if this record is equal to other by comparing TNF, type, ID, and payload.
inherited
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

Constants

classType → const String
The MIME type for WiFi Simple Configuration records.