fixed issues in create space and duplicate

This commit is contained in:
hannathkadher
2025-02-02 23:16:34 +04:00
parent 91dfd53477
commit e6e46be9b4
7 changed files with 90 additions and 29 deletions

View File

@ -95,6 +95,9 @@ class SpaceModel {
icon: json['icon'] ?? Assets.location,
position: Offset(json['x'] ?? 0, json['y'] ?? 0),
isHovered: false,
spaceModel: json['spaceModel'] != null
? SpaceTemplateModel.fromJson(json['spaceModel'])
: null,
tags: (json['tags'] as List<dynamic>?)
?.where((item) => item is Map<String, dynamic>) // Validate type
.map((item) => Tag.fromJson(item as Map<String, dynamic>))