chore(ui): update device state colors to match web
Change color and dynamic height table
This commit is contained in:
@@ -153,15 +153,15 @@ class DeviceUtils {
|
||||
|
||||
Color getTableRowColor(BuildContext context, int state) {
|
||||
if (state == 1) {
|
||||
return Colors.red;
|
||||
return const Color(0xFFF57070);
|
||||
} else if (state == 0) {
|
||||
return Colors.green;
|
||||
return const Color(0xFF9EF16D);
|
||||
} else if (state == 2) {
|
||||
return Colors.orange;
|
||||
return const Color(0xFFF5EF44);;
|
||||
} else if (state == -1) {
|
||||
return Colors.grey;
|
||||
return const Color(0xFFBBBAC2);;
|
||||
} else {
|
||||
return Theme.of(context).colorScheme.onSurface;
|
||||
return const Color(0xFFF5EF44);;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -269,17 +269,19 @@ class DeviceUtils {
|
||||
}
|
||||
}
|
||||
|
||||
Color getColorRiple(int state) {
|
||||
if (state == 1) {
|
||||
return Colors.red;
|
||||
} else if (state == 3) {
|
||||
return Colors.orange;
|
||||
} else if (state == -1) {
|
||||
return Colors.grey;
|
||||
} else {
|
||||
return Colors.green;
|
||||
}
|
||||
}
|
||||
// Color getColorRipple(int state) {
|
||||
// if (state == 1) {
|
||||
// return const Color(0xFFF57070);
|
||||
// } else if (state == 0) {
|
||||
// return const Color(0xFF9EF16D);
|
||||
// } else if (state == 2) {
|
||||
// return const Color(0xFFF5EF44);;
|
||||
// } else if (state == -1) {
|
||||
// return const Color(0xFFBBBAC2);;
|
||||
// } else {
|
||||
// return const Color(0xFFF5EF44);;
|
||||
// }
|
||||
// }
|
||||
|
||||
List<String> deviceBatteryImg = [
|
||||
IconConstants.instance.getIcon("full-battery"),
|
||||
|
||||
Reference in New Issue
Block a user