light interface

This commit is contained in:
Mohammad Salameh
2024-03-04 14:38:48 +03:00
parent 79e0b7ec21
commit 7ecac02a8a
12 changed files with 341 additions and 67 deletions

View File

@ -6,10 +6,13 @@ class LightModel extends DeviceModel {
late int lightingMode;
late List<int> recentColors;
LightModel({
required this.brightness,
required this.color,
required this.lightingMode,
required this.recentColors,
required super.id,
required super.name,
required super.type,
@ -25,6 +28,7 @@ class LightModel extends DeviceModel {
'color': color,
'lightingMode': lightingMode,
'timer': timer,
'recentColors': recentColors,
'id': id,
'name': name,
'status': status,
@ -46,6 +50,7 @@ class LightModel extends DeviceModel {
type: json['type'],
location: json['location'],
image: json['image'],
recentColors: json['recentColors'],
);
}
}