updated device management

This commit is contained in:
hannathkadher
2024-10-11 10:35:14 +04:00
parent b87bbb9a62
commit 29a1470428
19 changed files with 207 additions and 128 deletions

View File

@ -16,15 +16,11 @@ class CommunitySpaceManagementApi {
List<dynamic> jsonData = json['data'];
// Check if jsonData is actually a List
if (jsonData is List) {
List<CommunityModel> communityList = jsonData.map((jsonItem) {
return CommunityModel.fromJson(jsonItem);
}).toList();
return communityList;
} else {
throw Exception('Expected a list but got something else.');
}
},
List<CommunityModel> communityList = jsonData.map((jsonItem) {
return CommunityModel.fromJson(jsonItem);
}).toList();
return communityList;
},
);
return response;
} catch (e) {