added load new space models

This commit is contained in:
hannathkadher
2025-01-09 00:07:51 +04:00
parent 48c064c711
commit 339a242e74
12 changed files with 249 additions and 74 deletions

View File

@ -50,7 +50,27 @@ class SpaceModelManagementApi {
);
return response;
} catch (e) {
debugPrint('Error creating community: $e');
debugPrint('Error creating space model: $e');
return null;
}
}
Future<SpaceTemplateModel?> getSpaceModel(String spaceModelUuid) async {
try {
final response = await HTTPService().get(
path: ApiEndpoints.getSpaceModel
.replaceAll('{projectId}', TempConst.projectId)
.replaceAll('{spaceModelUuid}', spaceModelUuid),
showServerMessage: true,
expectedResponseModel: (json) {
debugPrint('Response JSON: $json');
return SpaceTemplateModel.fromJson(json['data']);
},
);
return response;
} catch (e) {
debugPrint('Error getting space model: $e');
return null;
}
}