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

@ -5,12 +5,7 @@ class DeviceSubSpace {
String? subspaceName;
bool? disabled;
DeviceSubSpace(
{this.id,
this.createdAt,
this.updatedAt,
this.subspaceName,
this.disabled});
DeviceSubSpace({this.id, this.createdAt, this.updatedAt, this.subspaceName, this.disabled});
DeviceSubSpace.fromJson(Map<String, dynamic> json) {
id = json['uuid']?.toString() ?? '';

View File

@ -212,8 +212,8 @@ PC
SOS
*/
final type = devicesTypesMap[productType] ?? DeviceType.Other;
var tempIcon = '';
DeviceType type = devicesTypesMap[productType] ?? DeviceType.Other;
String tempIcon = '';
if (type == DeviceType.LightBulb) {
tempIcon = Assets.lightBulb;
} else if (type == DeviceType.CeilingSensor ||
@ -441,9 +441,13 @@ SOS
VoltageCStatusFunction(
deviceId: uuid ?? '', deviceName: name ?? '', type: 'IF'),
CurrentCStatusFunction(
deviceId: uuid ?? '', deviceName: name ?? '', type: 'IF'),
deviceId: uuid ?? '',
deviceName: name ?? '',
type: 'IF'),
PowerFactorCStatusFunction(
deviceId: uuid ?? '', deviceName: name ?? '', type: 'IF'),
deviceId: uuid ?? '',
deviceName: name ?? '',
type: 'IF'),
];
default:
@ -561,23 +565,23 @@ SOS
}
Map<String, DeviceType> devicesTypesMap = {
'AC': DeviceType.AC,
'GW': DeviceType.Gateway,
'CPS': DeviceType.CeilingSensor,
'DL': DeviceType.DoorLock,
'WPS': DeviceType.WallSensor,
'3G': DeviceType.ThreeGang,
'2G': DeviceType.TwoGang,
'1G': DeviceType.OneGang,
'CUR': DeviceType.Curtain,
'WH': DeviceType.WH,
'DS': DeviceType.DS,
'1GT': DeviceType.OneTouch,
'2GT': DeviceType.TowTouch,
'3GT': DeviceType.ThreeTouch,
'GD': DeviceType.GarageDoor,
'WL': DeviceType.WaterLeak,
'NCPS': DeviceType.NCPS,
'PC': DeviceType.PC,
"AC": DeviceType.AC,
"GW": DeviceType.Gateway,
"CPS": DeviceType.CeilingSensor,
"DL": DeviceType.DoorLock,
"WPS": DeviceType.WallSensor,
"3G": DeviceType.ThreeGang,
"2G": DeviceType.TwoGang,
"1G": DeviceType.OneGang,
"CUR": DeviceType.Curtain,
"WH": DeviceType.WH,
"DS": DeviceType.DS,
"1GT": DeviceType.OneTouch,
"2GT": DeviceType.TowTouch,
"3GT": DeviceType.ThreeTouch,
"GD": DeviceType.GarageDoor,
"WL": DeviceType.WaterLeak,
"NCPS": DeviceType.NCPS,
"PC": DeviceType.PC,
};
}

View File

@ -6,13 +6,13 @@ class FactoryResetModel {
FactoryResetModel({
required this.devicesUuid,
this.operationType = 'RESET',
this.operationType = "RESET",
});
factory FactoryResetModel.fromJson(Map<String, dynamic> json) {
return FactoryResetModel(
devicesUuid: List<String>.from(json['devicesUuid']),
operationType: 'RESET',
operationType: "RESET",
);
}
@ -58,3 +58,4 @@ class FactoryResetModel {
@override
int get hashCode => devicesUuid.hashCode;
}