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
+9 -12
View File
@@ -77,15 +77,22 @@ Color _getColorFromName(String colorName) {
return Colors.lime;
case 'mint':
return Colors.greenAccent;
case 'sky':
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
}
}
// Load the target data files from the directory
void _loadTargetDataFiles() async {
try {
@@ -590,15 +597,6 @@ Widget _buildFolderRow(String folderName) {
color: isExpanded ? _bulletColor : Colors.transparent,
width: 1.5,
),
boxShadow: isExpanded
? [
BoxShadow(
color: _bulletColor.withOpacity(0.2),
blurRadius: 6,
offset: const Offset(0, 2),
),
]
: [],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -611,7 +609,6 @@ Widget _buildFolderRow(String folderName) {
? '🏆 $folderName'
: folderName,
style: const TextStyle(fontSize: 16, fontWeight: FontWeight.w600),
overflow: TextOverflow.ellipsis,
),
subtitle: Padding(
padding: const EdgeInsets.only(top: 4.0),
@@ -626,7 +623,7 @@ Widget _buildFolderRow(String folderName) {
IconButton(
iconSize: 22,
visualDensity: VisualDensity.compact,
icon: const Icon(Icons.my_location, color: Colors.grey),
icon: Icon(Icons.my_location, color: _bulletColor),
onPressed: () => _openFolderTargetView(folderName),
),
IconButton(
+10 -3
View File
@@ -61,16 +61,23 @@ Color _getColorFromName(String colorName) {
return Colors.lime;
case 'mint':
return Colors.greenAccent;
case 'sky':
return Colors.lightBlueAccent;
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;
return Colors.blue; // fallback
}
}
Future<void> _loadBulletCount() async {
final prefs = await SharedPreferences.getInstance();
setState(() {
+9 -2
View File
@@ -97,15 +97,22 @@ Color _getColorFromName(String colorName) {
return Colors.lime;
case 'mint':
return Colors.greenAccent;
case 'sky':
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
}
}
Offset _generatePositionForScore(int score, Offset center) {
const double bulletRadius = 25;
final List<double> rings = [14, 70, 125, 180, 235, 290, 345, 400, 455, 510];
@@ -657,7 +664,7 @@ void _moveBullet(Offset offsetDelta) {
);
},
style: ElevatedButton.styleFrom(
backgroundColor: _bulletColor.withOpacity(0.9),
backgroundColor: Colors.grey[800],
foregroundColor: Colors.white,
elevation: 0,
padding: const EdgeInsets.symmetric(vertical: 16),
+13 -3
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();
@@ -68,14 +72,20 @@ class _SettingsScreenState extends State<SettingsScreen> {
return Colors.lime;
case 'mint':
return Colors.greenAccent;
case 'sky':
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();
+7
View File
@@ -95,11 +95,18 @@ Color _getColorFromName(String colorName) {
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
}
}
void _setSystemBarStyle() {
SystemChrome.setSystemUIOverlayStyle(
SystemUiOverlayStyle(
+8 -1
View File
@@ -78,16 +78,23 @@ class _TargetViewScreenState extends State<TargetViewScreen> {
return Colors.lime;
case 'mint':
return Colors.greenAccent;
case 'sky':
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> _loadJsonAndImage() async {
try {
final byteData = await rootBundle.load(targetAssetPath);