WifiRecord constructor
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.
ssid - Network name (required)
networkKey - Network password (optional for open networks)
authenticationType - Authentication method (defaults to WPA2 Personal)
encryptionType - Encryption method (defaults to AES)
macAddress - Optional MAC address in format "AA:BB:CC:DD:EE:FF"
networkIndex - Network index (defaults to 1)
Implementation
WifiRecord({
this.ssid,
this.networkKey,
this.authenticationType = WifiAuthenticationType.wpa2Personal,
this.encryptionType = WifiEncryptionType.aes,
this.macAddress,
this.networkIndex = 1,
super.id,
}) : super(decodedType: WifiRecord.classType) {
// Validate MAC address format if provided
if (macAddress != null) {
_macAddressToBytes(macAddress); // This will throw if invalid
}
}