copyWith method

Wifi copyWith({
  1. String? state,
  2. String? ssid,
  3. String? bssid,
  4. bool? hiddenSsid,
  5. String? ipv4Address,
  6. String? ipv6Address,
  7. String? signalStrength,
  8. String? linkSpeed,
  9. String? frequency,
  10. String? networkId,
  11. String? gateway,
  12. String? netmask,
  13. String? dns1,
  14. String? dhcpLeaseDuration,
  15. String? w5ghzBand,
  16. bool? isWifiAware,
  17. bool? isWifiDirectAvailable,
})

copyWith returns a new instance of Wifi class.

Implementation

Wifi copyWith({
  String? state,
  String? ssid,
  String? bssid,
  bool? hiddenSsid,
  String? ipv4Address,
  String? ipv6Address,
  String? signalStrength,
  String? linkSpeed,
  String? frequency,
  String? networkId,
  String? gateway,
  String? netmask,
  String? dns1,
  String? dhcpLeaseDuration,
  String? w5ghzBand,
  bool? isWifiAware,
  bool? isWifiDirectAvailable,
}) {
  return Wifi(
    state: state ?? this.state,
    ssid: ssid ?? this.ssid,
    bssid: bssid ?? this.bssid,
    hiddenSsid: hiddenSsid ?? this.hiddenSsid,
    ipv4Address: ipv4Address ?? this.ipv4Address,
    ipv6Address: ipv6Address ?? this.ipv6Address,
    signalStrength: signalStrength ?? this.signalStrength,
    linkSpeed: linkSpeed ?? this.linkSpeed,
    frequency: frequency ?? this.frequency,
    networkId: networkId ?? this.networkId,
    gateway: gateway ?? this.gateway,
    netmask: netmask ?? this.netmask,
    dns1: dns1 ?? this.dns1,
    dhcpLeaseDuration: dhcpLeaseDuration ?? this.dhcpLeaseDuration,
    w5ghzBand: w5ghzBand ?? this.w5ghzBand,
    isWifiAware: isWifiAware ?? this.isWifiAware,
    isWifiDirectAvailable:
        isWifiDirectAvailable ?? this.isWifiDirectAvailable,
  );
}