Refactor device status handling and update UI components

- Update device status handling from 'status' to 'isOnline' for consistency
- Remove unused imports and redundant code related to light switches
- Refactor UI components to use 'isOnline' instead of 'status' for device status
This commit is contained in:
Mohammad Salameh
2024-04-01 09:58:51 +03:00
parent 3031d19836
commit a20dfa3709
12 changed files with 152 additions and 545 deletions

View File

@ -19,7 +19,7 @@ class CustomSwitch extends StatelessWidget {
builder: (context, state) {
bool? status;
if (device != null) {
status = device!.status;
status = device!.isOnline;
} else if (category != null) {
status = category!.devicesStatus;
}