mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-15 17:47:28 +00:00
Removed location from models
Added the spaces models Added the rooms models Added the Spaces cubit Implemented the home dropdown functionality
This commit is contained in:
29
lib/features/app_layout/model/space_model.dart
Normal file
29
lib/features/app_layout/model/space_model.dart
Normal file
@ -0,0 +1,29 @@
|
||||
import 'package:syncrow_app/features/devices/model/room_model.dart';
|
||||
|
||||
class SpaceModel {
|
||||
final String id;
|
||||
final String name;
|
||||
final List<RoomModel> rooms;
|
||||
|
||||
SpaceModel({
|
||||
required this.id,
|
||||
required this.name,
|
||||
required this.rooms,
|
||||
});
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
return {
|
||||
'id': id,
|
||||
'name': name,
|
||||
'rooms': rooms,
|
||||
};
|
||||
}
|
||||
|
||||
factory SpaceModel.fromJson(Map<String, dynamic> json) {
|
||||
return SpaceModel(
|
||||
id: json['id'],
|
||||
name: json['name'],
|
||||
rooms: json['rooms'],
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user