Files
syncrow-app/lib/features/devices/model/room_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

31 lines
585 B
Dart

import 'package:syncrow_app/features/devices/model/device_category_model.dart';
class RoomModel {
final String id;
final String name;
final List<DevicesCategoryModel> categories;
RoomModel({
required this.id,
required this.name,
required this.categories,
});
Map<String, dynamic> toJson() {
return {
'id': id,
'name': name,
'devices': categories,
};
}
factory RoomModel.fromJson(Map<String, dynamic> json) {
return RoomModel(
id: json['id'],
name: json['name'],
categories: json['devices'],
);
}
}