First designs for ui

This commit is contained in:
verboomp
2026-01-23 15:09:34 +01:00
parent b3de3eec8c
commit f48bfe2107
41 changed files with 1727 additions and 412 deletions

View File

@@ -1,4 +1,4 @@
import 'package:flutter/material.dart' show Colors, Color;
import 'package:flutter/material.dart' show Color;
extension HexColor on Color {
/// String is in the format "aabbcc" or "ffaabbcc" with an optional leading "#".
@@ -9,21 +9,3 @@ extension HexColor on Color {
return Color(int.parse(buffer.toString(), radix: 16));
}
}
extension RiskColor on Color {
static const Color noRisk = Colors.transparent;
static final Color lowRisk = HexColor.fromHex("#FFFF00");
static final Color mediumRisk = HexColor.fromHex("#FF9000");
static final Color highRisk = HexColor.fromHex("#FF4000");
static Color colorForRisk(int value) {
if (value == 1) {
return lowRisk;
} else if (value == 2) {
return mediumRisk;
} else if (value == 3) {
return highRisk;
}
return noRisk;
}
}