color update with small UI changes

This commit is contained in:
2025-04-09 15:37:26 +02:00
parent b3efbb3331
commit f73932cc98
6 changed files with 83 additions and 48 deletions
+40 -30
View File
@@ -33,10 +33,14 @@ class _SettingsScreenState extends State<SettingsScreen> {
'Pink',
'Lime',
'Mint',
'Sky',
'Orange',
'Violet',
'Amber',
'Brown',
'Grey',
];
@override
void initState() {
super.initState();
@@ -46,36 +50,42 @@ class _SettingsScreenState extends State<SettingsScreen> {
}
Color _getColorFromName(String colorName) {
switch (colorName.toLowerCase()) {
case 'blue':
return Colors.blue;
case 'green':
return Colors.green;
case 'yellow':
return Colors.yellow;
case 'purple':
return Colors.purple;
case 'cyan':
return Colors.cyan;
case 'teal':
return Colors.teal;
case 'indigo':
return Colors.indigo;
case 'pink':
return Colors.pink;
case 'lime':
return Colors.lime;
case 'mint':
return Colors.greenAccent;
case 'sky':
return Colors.orange;
case 'violet':
return Colors.deepPurpleAccent;
default:
return Colors.blue; // fallback
}
Color _getColorFromName(String colorName) {
switch (colorName.toLowerCase()) {
case 'blue':
return Colors.blue;
case 'green':
return Colors.green;
case 'yellow':
return Colors.yellow;
case 'purple':
return Colors.purple;
case 'cyan':
return Colors.cyan;
case 'teal':
return Colors.teal;
case 'indigo':
return Colors.indigo;
case 'pink':
return Colors.pink;
case 'lime':
return Colors.lime;
case 'mint':
return Colors.greenAccent;
case 'orange':
return Colors.orange;
case 'violet':
return Colors.deepPurpleAccent;
case 'amber':
return Colors.amber;
case 'brown':
return Colors.brown;
case 'grey':
return Colors.grey;
default:
return Colors.blue; // fallback
}
}
Future<void> _loadBulletColor() async {
final prefs = await SharedPreferences.getInstance();