Revert "formatted all files."

This reverts commit 04250ebc98.
This commit is contained in:
Faris Armoush
2025-06-12 16:04:49 +03:00
parent 218f43bacb
commit c642ba2644
473 changed files with 4335 additions and 5417 deletions

View File

@ -15,8 +15,7 @@ class AirQualityDataModel extends Equatable {
return AirQualityDataModel(
date: DateTime.parse(json['date'] as String),
data: (json['data'] as List<dynamic>)
.map((e) =>
AirQualityPercentageData.fromJson(e as Map<String, dynamic>))
.map((e) => AirQualityPercentageData.fromJson(e as Map<String, dynamic>))
.toList(),
);
}
@ -47,7 +46,7 @@ class AirQualityPercentageData extends Equatable {
factory AirQualityPercentageData.fromJson(Map<String, dynamic> json) {
return AirQualityPercentageData(
type: json['type'] as String? ?? '',
type: json['type'] as String? ?? '',
name: json['name'] as String? ?? '',
percentage: (json['percentage'] as num?)?.toDouble() ?? 0,
);

View File

@ -36,14 +36,11 @@ class AnalyticsDevice {
deviceTuyaUuid: json['deviceTuyaUuid'] as String?,
isActive: json['isActive'] as bool?,
productDevice: json['productDevice'] != null
? ProductDevice.fromJson(
json['productDevice'] as Map<String, dynamic>)
? ProductDevice.fromJson(json['productDevice'] as Map<String, dynamic>)
: null,
spaceUuid: json['spaceUuid'] as String?,
latitude:
json['lat'] != null ? double.parse(json['lat'] as String) : null,
longitude:
json['lon'] != null ? double.parse(json['lon'] as String) : null,
latitude: json['lat'] != null ? double.parse(json['lat'] as String) : null,
longitude: json['lon'] != null ? double.parse(json['lon'] as String) : null,
);
}
}

View File

@ -15,8 +15,7 @@ class Occupacy extends Equatable {
factory Occupacy.fromJson(Map<String, dynamic> json) {
return Occupacy(
date:
DateTime.parse(json['event_date'] as String? ?? '${DateTime.now()}'),
date: DateTime.parse(json['event_date'] as String? ?? '${DateTime.now()}'),
occupancy: (json['occupancy_percentage'] ?? 0).toString(),
spaceUuid: json['space_uuid'] as String? ?? '',
occupiedSeconds: json['occupied_seconds'] as int? ?? 0,

View File

@ -19,8 +19,7 @@ class OccupancyHeatMapModel extends Equatable {
eventDate: DateTime.parse(
json['event_date'] as String? ?? '${DateTime.now()}',
),
countTotalPresenceDetected:
json['count_total_presence_detected'] as int? ?? 0,
countTotalPresenceDetected: json['count_total_presence_detected'] as int? ?? 0,
);
}