Merge pull request #80 from SyncrowIOT/side_tree

Side tree
This commit is contained in:
Abdullah
2025-02-04 01:56:52 +03:00
committed by GitHub
11 changed files with 63 additions and 26 deletions

View File

@ -23,7 +23,8 @@ class DevicesManagementApi {
: ApiEndpoints.getAllDevices,
showServerMessage: true,
expectedResponseModel: (json) {
List<dynamic> jsonData = json;
List<dynamic> jsonData =
communityId.isNotEmpty && spaceId.isNotEmpty ? json['data'] : json;
List<AllDevicesModel> devicesList = jsonData.map((jsonItem) {
return AllDevicesModel.fromJson(jsonItem);
}).toList();