mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-15 17:47:28 +00:00
added Null state from the AC universal switch (in case the status for the ACs are different from each other)
This commit is contained in:
@ -22,8 +22,10 @@ class CustomSwitch extends StatelessWidget {
|
||||
height: 28.0,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(24.0),
|
||||
color: category.devicesStatus
|
||||
? ColorsManager.primaryColor
|
||||
color: category.devicesStatus != null
|
||||
? category.devicesStatus!
|
||||
? ColorsManager.primaryColor
|
||||
: const Color(0xFFD9D9D9)
|
||||
: const Color(0xFFD9D9D9),
|
||||
),
|
||||
child: Center(
|
||||
@ -37,16 +39,20 @@ class CustomSwitch extends StatelessWidget {
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(2.0),
|
||||
child: Container(
|
||||
alignment: category.devicesStatus
|
||||
? Alignment.centerRight
|
||||
alignment: category.devicesStatus != null
|
||||
? category.devicesStatus!
|
||||
? Alignment.centerRight
|
||||
: Alignment.centerLeft
|
||||
: Alignment.centerLeft,
|
||||
child: Container(
|
||||
width: 20.0,
|
||||
height: 20.0,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: category.devicesStatus
|
||||
? ColorsManager.primaryColor
|
||||
color: category.devicesStatus != null
|
||||
? category.devicesStatus!
|
||||
? ColorsManager.primaryColor
|
||||
: Colors.grey
|
||||
: Colors.grey,
|
||||
),
|
||||
),
|
||||
|
Reference in New Issue
Block a user