mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-11-27 20:34:54 +00:00
Add device icons based on device type and update network exception handling
- Add logic to set device icons based on device type in DeviceModel.fromJson method - Update network exception handling to parse HTML response in ServerFailure class - Add html package as a dependency for parsing HTML responses -Added Devices Icons by updateing device types mapping
This commit is contained in:
@ -29,17 +29,32 @@ enum DeviceType {
|
||||
Other,
|
||||
}
|
||||
|
||||
// Map<String, DeviceType> devicesTypesMap = {
|
||||
// "AC": DeviceType.AC,
|
||||
// "LB": DeviceType.LightBulb,
|
||||
// "DL": DeviceType.DoorLock,
|
||||
// "WC": DeviceType.Curtain,
|
||||
// "WB": DeviceType.Blind,
|
||||
// "3G": DeviceType.ThreeGang,
|
||||
// "GW": DeviceType.Gateway,
|
||||
// "CPS": DeviceType.CeilingSensor,
|
||||
// "WPS": DeviceType.WallSensor,
|
||||
// "Other": DeviceType.Other,
|
||||
// };
|
||||
//AC wzdcrqh0
|
||||
// GW wp8ticoo2bhumwgb
|
||||
// CPS d3ci7gcn
|
||||
// DL awu7anehyu5q1iu8
|
||||
// WPS awarhusb
|
||||
// 3G 1a6vgvyi
|
||||
|
||||
Map<String, DeviceType> devicesTypesMap = {
|
||||
"AC": DeviceType.AC,
|
||||
"LB": DeviceType.LightBulb,
|
||||
"DL": DeviceType.DoorLock,
|
||||
"WC": DeviceType.Curtain,
|
||||
"WB": DeviceType.Blind,
|
||||
"3G": DeviceType.ThreeGang,
|
||||
"GW": DeviceType.Gateway,
|
||||
"CPS": DeviceType.CeilingSensor,
|
||||
"WPS": DeviceType.WallSensor,
|
||||
"Other": DeviceType.Other,
|
||||
"wzdcrqh0": DeviceType.AC,
|
||||
"wp8ticoo2bhumwgb": DeviceType.Gateway,
|
||||
"d3ci7gcn": DeviceType.CeilingSensor,
|
||||
"awu7anehyu5q1iu8": DeviceType.DoorLock,
|
||||
"awarhusb": DeviceType.WallSensor,
|
||||
"1a6vgvyi": DeviceType.ThreeGang,
|
||||
};
|
||||
Map<DeviceType, List<FunctionModel>> devicesFunctionsMap = {
|
||||
DeviceType.AC: [
|
||||
|
||||
Reference in New Issue
Block a user