color update with small UI changes
This commit is contained in:
@@ -77,15 +77,22 @@ Color _getColorFromName(String colorName) {
|
|||||||
return Colors.lime;
|
return Colors.lime;
|
||||||
case 'mint':
|
case 'mint':
|
||||||
return Colors.greenAccent;
|
return Colors.greenAccent;
|
||||||
case 'sky':
|
case 'orange':
|
||||||
return Colors.orange;
|
return Colors.orange;
|
||||||
case 'violet':
|
case 'violet':
|
||||||
return Colors.deepPurpleAccent;
|
return Colors.deepPurpleAccent;
|
||||||
|
case 'amber':
|
||||||
|
return Colors.amber;
|
||||||
|
case 'brown':
|
||||||
|
return Colors.brown;
|
||||||
|
case 'grey':
|
||||||
|
return Colors.grey;
|
||||||
default:
|
default:
|
||||||
return Colors.blue; // fallback
|
return Colors.blue; // fallback
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Load the target data files from the directory
|
// Load the target data files from the directory
|
||||||
void _loadTargetDataFiles() async {
|
void _loadTargetDataFiles() async {
|
||||||
try {
|
try {
|
||||||
@@ -590,15 +597,6 @@ Widget _buildFolderRow(String folderName) {
|
|||||||
color: isExpanded ? _bulletColor : Colors.transparent,
|
color: isExpanded ? _bulletColor : Colors.transparent,
|
||||||
width: 1.5,
|
width: 1.5,
|
||||||
),
|
),
|
||||||
boxShadow: isExpanded
|
|
||||||
? [
|
|
||||||
BoxShadow(
|
|
||||||
color: _bulletColor.withOpacity(0.2),
|
|
||||||
blurRadius: 6,
|
|
||||||
offset: const Offset(0, 2),
|
|
||||||
),
|
|
||||||
]
|
|
||||||
: [],
|
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
@@ -611,7 +609,6 @@ Widget _buildFolderRow(String folderName) {
|
|||||||
? '🏆 $folderName'
|
? '🏆 $folderName'
|
||||||
: folderName,
|
: folderName,
|
||||||
style: const TextStyle(fontSize: 16, fontWeight: FontWeight.w600),
|
style: const TextStyle(fontSize: 16, fontWeight: FontWeight.w600),
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
),
|
),
|
||||||
subtitle: Padding(
|
subtitle: Padding(
|
||||||
padding: const EdgeInsets.only(top: 4.0),
|
padding: const EdgeInsets.only(top: 4.0),
|
||||||
@@ -626,7 +623,7 @@ Widget _buildFolderRow(String folderName) {
|
|||||||
IconButton(
|
IconButton(
|
||||||
iconSize: 22,
|
iconSize: 22,
|
||||||
visualDensity: VisualDensity.compact,
|
visualDensity: VisualDensity.compact,
|
||||||
icon: const Icon(Icons.my_location, color: Colors.grey),
|
icon: Icon(Icons.my_location, color: _bulletColor),
|
||||||
onPressed: () => _openFolderTargetView(folderName),
|
onPressed: () => _openFolderTargetView(folderName),
|
||||||
),
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
|
|||||||
@@ -61,16 +61,23 @@ Color _getColorFromName(String colorName) {
|
|||||||
return Colors.lime;
|
return Colors.lime;
|
||||||
case 'mint':
|
case 'mint':
|
||||||
return Colors.greenAccent;
|
return Colors.greenAccent;
|
||||||
case 'sky':
|
case 'orange':
|
||||||
return Colors.lightBlueAccent;
|
return Colors.orange;
|
||||||
case 'violet':
|
case 'violet':
|
||||||
return Colors.deepPurpleAccent;
|
return Colors.deepPurpleAccent;
|
||||||
|
case 'amber':
|
||||||
|
return Colors.amber;
|
||||||
|
case 'brown':
|
||||||
|
return Colors.brown;
|
||||||
|
case 'grey':
|
||||||
|
return Colors.grey;
|
||||||
default:
|
default:
|
||||||
return Colors.blue;
|
return Colors.blue; // fallback
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Future<void> _loadBulletCount() async {
|
Future<void> _loadBulletCount() async {
|
||||||
final prefs = await SharedPreferences.getInstance();
|
final prefs = await SharedPreferences.getInstance();
|
||||||
setState(() {
|
setState(() {
|
||||||
|
|||||||
@@ -97,15 +97,22 @@ Color _getColorFromName(String colorName) {
|
|||||||
return Colors.lime;
|
return Colors.lime;
|
||||||
case 'mint':
|
case 'mint':
|
||||||
return Colors.greenAccent;
|
return Colors.greenAccent;
|
||||||
case 'sky':
|
case 'orange':
|
||||||
return Colors.orange;
|
return Colors.orange;
|
||||||
case 'violet':
|
case 'violet':
|
||||||
return Colors.deepPurpleAccent;
|
return Colors.deepPurpleAccent;
|
||||||
|
case 'amber':
|
||||||
|
return Colors.amber;
|
||||||
|
case 'brown':
|
||||||
|
return Colors.brown;
|
||||||
|
case 'grey':
|
||||||
|
return Colors.grey;
|
||||||
default:
|
default:
|
||||||
return Colors.blue; // fallback
|
return Colors.blue; // fallback
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Offset _generatePositionForScore(int score, Offset center) {
|
Offset _generatePositionForScore(int score, Offset center) {
|
||||||
const double bulletRadius = 25;
|
const double bulletRadius = 25;
|
||||||
final List<double> rings = [14, 70, 125, 180, 235, 290, 345, 400, 455, 510];
|
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(
|
style: ElevatedButton.styleFrom(
|
||||||
backgroundColor: _bulletColor.withOpacity(0.9),
|
backgroundColor: Colors.grey[800],
|
||||||
foregroundColor: Colors.white,
|
foregroundColor: Colors.white,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||||
|
|||||||
@@ -33,10 +33,14 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
|||||||
'Pink',
|
'Pink',
|
||||||
'Lime',
|
'Lime',
|
||||||
'Mint',
|
'Mint',
|
||||||
'Sky',
|
'Orange',
|
||||||
'Violet',
|
'Violet',
|
||||||
|
'Amber',
|
||||||
|
'Brown',
|
||||||
|
'Grey',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
@@ -68,10 +72,16 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
|||||||
return Colors.lime;
|
return Colors.lime;
|
||||||
case 'mint':
|
case 'mint':
|
||||||
return Colors.greenAccent;
|
return Colors.greenAccent;
|
||||||
case 'sky':
|
case 'orange':
|
||||||
return Colors.orange;
|
return Colors.orange;
|
||||||
case 'violet':
|
case 'violet':
|
||||||
return Colors.deepPurpleAccent;
|
return Colors.deepPurpleAccent;
|
||||||
|
case 'amber':
|
||||||
|
return Colors.amber;
|
||||||
|
case 'brown':
|
||||||
|
return Colors.brown;
|
||||||
|
case 'grey':
|
||||||
|
return Colors.grey;
|
||||||
default:
|
default:
|
||||||
return Colors.blue; // fallback
|
return Colors.blue; // fallback
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,11 +95,18 @@ Color _getColorFromName(String colorName) {
|
|||||||
return Colors.orange;
|
return Colors.orange;
|
||||||
case 'violet':
|
case 'violet':
|
||||||
return Colors.deepPurpleAccent;
|
return Colors.deepPurpleAccent;
|
||||||
|
case 'amber':
|
||||||
|
return Colors.amber;
|
||||||
|
case 'brown':
|
||||||
|
return Colors.brown;
|
||||||
|
case 'grey':
|
||||||
|
return Colors.grey;
|
||||||
default:
|
default:
|
||||||
return Colors.blue; // fallback
|
return Colors.blue; // fallback
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void _setSystemBarStyle() {
|
void _setSystemBarStyle() {
|
||||||
SystemChrome.setSystemUIOverlayStyle(
|
SystemChrome.setSystemUIOverlayStyle(
|
||||||
SystemUiOverlayStyle(
|
SystemUiOverlayStyle(
|
||||||
|
|||||||
@@ -78,16 +78,23 @@ class _TargetViewScreenState extends State<TargetViewScreen> {
|
|||||||
return Colors.lime;
|
return Colors.lime;
|
||||||
case 'mint':
|
case 'mint':
|
||||||
return Colors.greenAccent;
|
return Colors.greenAccent;
|
||||||
case 'sky':
|
case 'orange':
|
||||||
return Colors.orange;
|
return Colors.orange;
|
||||||
case 'violet':
|
case 'violet':
|
||||||
return Colors.deepPurpleAccent;
|
return Colors.deepPurpleAccent;
|
||||||
|
case 'amber':
|
||||||
|
return Colors.amber;
|
||||||
|
case 'brown':
|
||||||
|
return Colors.brown;
|
||||||
|
case 'grey':
|
||||||
|
return Colors.grey;
|
||||||
default:
|
default:
|
||||||
return Colors.blue; // fallback
|
return Colors.blue; // fallback
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Future<void> _loadJsonAndImage() async {
|
Future<void> _loadJsonAndImage() async {
|
||||||
try {
|
try {
|
||||||
final byteData = await rootBundle.load(targetAssetPath);
|
final byteData = await rootBundle.load(targetAssetPath);
|
||||||
|
|||||||
Reference in New Issue
Block a user