Merged with dev and solved conflicts

This commit is contained in:
Abdullah Alassaf
2024-09-03 12:18:17 +03:00
19 changed files with 277 additions and 182 deletions

View File

@ -42,6 +42,10 @@ class DeviceManagementBody extends StatelessWidget with HelperResponsiveLayout {
offlineCount = state.offlineCount;
lowBatteryCount = state.lowBatteryCount;
isControlButtonEnabled = state.selectedDevice != null;
} else if (state is DeviceManagementInitial) {
devicesToShow = [];
selectedIndex = 0;
isControlButtonEnabled = false;
}
final tabs = [
@ -122,6 +126,7 @@ class DeviceManagementBody extends StatelessWidget with HelperResponsiveLayout {
},
withCheckBox: true,
size: context.screenSize,
uuidIndex: 2,
headers: const [
'Device Name',
'Product Name',
@ -150,10 +155,15 @@ class DeviceManagementBody extends StatelessWidget with HelperResponsiveLayout {
(device.updateTime ?? 0) * 1000)),
];
}).toList(),
initialSelectedIds: context
.read<DeviceManagementBloc>()
.selectedDevices
.map((device) => device.uuid!)
.toList(),
isEmpty: devicesToShow.isEmpty,
),
),
),
)
],
);
},