class WifiNetwork {
  const WifiNetwork({
    required this.ssid,
    required this.signal,
    required this.security,
  });

  final String ssid;
  final int signal;
  final String security;

  factory WifiNetwork.fromJson(Map<String, dynamic> json) {
    return WifiNetwork(
      ssid: json['ssid'] as String? ?? '',
      signal: json['signal'] as int? ?? 0,
      security: json['security'] as String? ?? 'Unknown',
    );
  }

  String get signalLabel => '$signal dBm';
}
