mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-15 09:45:22 +00:00
Semi-implemented getting spaces feature
This commit is contained in:
@ -1,9 +1,9 @@
|
||||
import 'package:syncrow_app/features/devices/model/room_model.dart';
|
||||
|
||||
class SpaceModel {
|
||||
final String id;
|
||||
final String name;
|
||||
final List<RoomModel> rooms;
|
||||
final int? id;
|
||||
final String? name;
|
||||
final List<RoomModel>? rooms;
|
||||
|
||||
SpaceModel({
|
||||
required this.id,
|
||||
@ -21,9 +21,9 @@ class SpaceModel {
|
||||
|
||||
factory SpaceModel.fromJson(Map<String, dynamic> json) {
|
||||
return SpaceModel(
|
||||
id: json['id'],
|
||||
name: json['name'],
|
||||
rooms: json['rooms'],
|
||||
id: int.parse(json['homeId']),
|
||||
name: json['homeName'],
|
||||
rooms: [],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user