WifiRecord constructor

WifiRecord({
  1. String? ssid,
  2. String? networkKey,
  3. WifiAuthenticationType authenticationType = WifiAuthenticationType.wpa2Personal,
  4. WifiEncryptionType encryptionType = WifiEncryptionType.aes,
  5. String? macAddress,
  6. int networkIndex = 1,
  7. 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
  }
}