mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-16 01:56:19 +00:00
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:
@ -28,7 +28,7 @@ class LightInterfaceSwitch extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
BodyLarge(
|
||||
text: light.status ?? false
|
||||
text: light.isOnline ?? false
|
||||
? StringsManager.on
|
||||
: StringsManager.off,
|
||||
style:
|
||||
@ -37,7 +37,7 @@ class LightInterfaceSwitch extends StatelessWidget {
|
||||
Container(
|
||||
width: 35,
|
||||
decoration: ShapeDecoration(
|
||||
color: light.status ?? false
|
||||
color: light.isOnline ?? false
|
||||
? ColorsManager.primaryColorWithOpacity
|
||||
: Colors.grey,
|
||||
shape: const CircleBorder(),
|
||||
|
Reference in New Issue
Block a user