class BleServiceStatus { const BleServiceStatus({ required this.running, required this.embedded, this.deviceName, }); final bool running; final bool embedded; final String? deviceName; factory BleServiceStatus.initial() { return const BleServiceStatus(running: false, embedded: false); } factory BleServiceStatus.fromJson(Map json) { return BleServiceStatus( running: json['running'] as bool? ?? false, embedded: json['embedded'] as bool? ?? false, deviceName: json['device_name'] as String?, ); } }