This commit is contained in:
tao
2025-09-01 09:23:42 +08:00
parent 0af8d30cae
commit 00a81e4e7b
5 changed files with 63 additions and 49 deletions

View File

@@ -23,16 +23,20 @@ class _ItemWidgetState extends State<ItemWidget> {
@override
Widget build(BuildContext context) {
var color = Colors.black;
var statusText = "";
switch (widget.data.skinStatus) {
case 1:
color = Theme.of(context).colorScheme.success;
statusText = "healthy";
break;
case 2:
color = Theme.of(context).colorScheme.warning;
statusText = "issues";
break;
case 3:
color = Theme.of(context).colorScheme.error;
statusText = "error";
break;
default:
color = Colors.black;
@@ -90,7 +94,7 @@ class _ItemWidgetState extends State<ItemWidget> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"healthy",
statusText,
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w500, color: color),
),
Container(