Files
syncrow-app/lib/features/devices/model/device_model.dart
Mohammad Salameh f8e8591d13 Implemented room device interface
(AC only)
2024-03-07 14:53:13 +03:00

44 lines
965 B
Dart

import 'package:syncrow_app/generated/assets.dart';
import 'package:syncrow_app/utils/resource_manager/constants.dart';
abstract class DeviceModel {
final String? id;
final String? name;
final DeviceType? type;
bool? status;
final String? image;
final double? timer;
late final String icon;
bool isSelected = false;
DeviceModel({
required this.id,
required this.name,
required this.type,
required this.status,
required this.image,
required this.timer,
}) {
switch (type) {
case DeviceType.AC:
icon = Assets.iconsAC;
break;
case DeviceType.Lights:
icon = Assets.iconsLight;
break;
case DeviceType.Door:
icon = Assets.iconsDoorLock;
break;
case DeviceType.Curtain:
icon = Assets.iconsCurtain;
break;
case DeviceType.Gateway:
icon = Assets.iconsGateway;
break;
default:
icon = '';
}
}
}