create routine dialog flow

This commit is contained in:
mohammad
2025-03-24 13:57:53 +03:00
parent 7e1c2ba712
commit 7e06dd76cf
17 changed files with 863 additions and 239 deletions

View File

@ -302,4 +302,24 @@ class CommunitySpaceManagementApi {
return [];
}
}
Future<List<SpaceModel>> getSpaceOnlyWithDevices(
{String? communityId, String? projectId}) async {
try {
final response = await HTTPService().get(
path: ApiEndpoints.spaceOnlyWithDevices
.replaceAll('{communityId}', communityId!)
.replaceAll('{projectId}', projectId!),
expectedResponseModel: (json) {
final spaceModels = (json['data'] as List)
.map((spaceJson) => SpaceModel.fromJson(spaceJson))
.toList();
return spaceModels;
},
);
return response;
} catch (e) {
debugPrint('Error fetching space hierarchy: $e');
return [];
}
}
}