diff --git a/lib/screens/preview_screen.dart b/lib/screens/preview_screen.dart index 321b771..5808da1 100644 --- a/lib/screens/preview_screen.dart +++ b/lib/screens/preview_screen.dart @@ -47,12 +47,15 @@ class _PreviewScreenState extends State { final List _manualBulletScores = []; Color _bulletColor = Colors.blue; // default fallback - double get _bulletOpacity => 0.8; - Color get _bulletColorWithOpacity => _bulletColor.withOpacity(_bulletOpacity); + double get _bulletOpacity => 0.7; bool _isEditMode = false; int? _selectedBulletIndexInEdit; + Color get _editColor => Colors.deepOrangeAccent; + Color get _activeColor => _isEditMode ? _editColor : _bulletColor; + Color get _activeColorWithOpacity => _activeColor.withOpacity(_bulletOpacity); + @override void initState() { @@ -273,7 +276,7 @@ Future _showMismatchOptionsDialog(int detectedCount) async { child: ElevatedButton( onPressed: () => Navigator.pop(context, 'manual'), style: ElevatedButton.styleFrom( - backgroundColor: _bulletColor, + backgroundColor: _activeColor, padding: const EdgeInsets.symmetric(vertical: 16), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(12), @@ -365,7 +368,7 @@ void _manualScoreEntry() { Navigator.pop(context); }, style: ElevatedButton.styleFrom( - backgroundColor: Colors.greenAccent[700], + backgroundColor: _bulletColor, foregroundColor: Colors.white, padding: const EdgeInsets.symmetric(vertical: 14), shape: RoundedRectangleBorder( @@ -923,11 +926,11 @@ Widget build(BuildContext context) { width: bulletSize, height: bulletSize, decoration: BoxDecoration( - color: _bulletColorWithOpacity, + color: _activeColorWithOpacity, shape: BoxShape.circle, border: Border.all( color: isSelectedForEdit - ? Colors.red + ? _bulletColor : (!_isEditMode && isHighlighted) ? Colors.red : Colors.black, @@ -1022,8 +1025,8 @@ Widget build(BuildContext context) { child: Container( decoration: BoxDecoration( color: isSelected - ? Colors.red[400] - : _bulletColor, + ? _editColor + : _activeColor, borderRadius: const BorderRadius.only( bottomLeft: Radius.circular(16), bottomRight: Radius.circular(16), @@ -1074,7 +1077,7 @@ Widget build(BuildContext context) { style: const TextStyle(color: Colors.white), ), style: ElevatedButton.styleFrom( - backgroundColor: _bulletColor, + backgroundColor: _activeColor, // ← dynamic color depending on mode padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(10),