Files
syncrow-app/lib/features/devices/model/curtain_model.dart
Mohammad Salameh b3fcca639a Removed location from models
Added the spaces models
Added the rooms models
Added the Spaces cubit
Implemented the home dropdown functionality
2024-03-06 21:34:23 +03:00

40 lines
879 B
Dart

import 'package:syncrow_app/features/devices/model/device_model.dart';
class CurtainModel extends DeviceModel {
late int openPercentage;
CurtainModel({
required this.openPercentage,
required super.id,
required super.name,
required super.type,
required super.status,
required super.image,
required super.timer,
});
Map<String, dynamic> toJson() {
return {
'openPercentage': openPercentage,
'timer': timer,
'id': id,
'name': name,
'status': status,
'type': type,
'image': image,
};
}
factory CurtainModel.fromJson(Map<String, dynamic> json) {
return CurtainModel(
id: json['id'],
name: json['name'],
status: json['status'],
openPercentage: json['openPercentage'],
timer: json['timer'],
type: json['type'],
image: json['image'],
);
}
}