mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-11-27 03:04:54 +00:00
fixed space
This commit is contained in:
@ -1,11 +1,11 @@
|
||||
import 'package:syncrow_app/features/app_layout/model/community_model.dart';
|
||||
import 'package:syncrow_app/features/devices/model/room_model.dart';
|
||||
import 'package:syncrow_app/features/devices/model/subspace_model.dart';
|
||||
|
||||
class SpaceModel {
|
||||
final String id;
|
||||
final String name;
|
||||
final Community community;
|
||||
final List<SubSpaceModel> subspaces;
|
||||
late List<SubSpaceModel> subspaces;
|
||||
|
||||
SpaceModel({
|
||||
required this.id,
|
||||
@ -27,7 +27,7 @@ class SpaceModel {
|
||||
/// Factory constructor to create an instance from JSON.
|
||||
factory SpaceModel.fromJson(Map<String, dynamic> json) {
|
||||
final spaceData = json['space'] as Map<String, dynamic>? ?? {};
|
||||
|
||||
|
||||
return SpaceModel(
|
||||
id: json['uuid'] ?? '',
|
||||
name: spaceData['spaceName'] ?? 'Unnamed Space',
|
||||
|
||||
Reference in New Issue
Block a user