Explorar o código

feat: improve color contrast

Léo Salé %!s(int64=3) %!d(string=hai) anos
pai
achega
9051190f44
Modificáronse 2 ficheiros con 25 adicións e 20 borrados
  1. 20 20
      app/lib/exercises/exercises_page.dart
  2. 5 0
      app/lib/menu/main_page.dart

+ 20 - 20
app/lib/exercises/exercises_page.dart

@@ -39,27 +39,27 @@ class ExercisesPage extends StatelessWidget {
               mainAxisAlignment: MainAxisAlignment.spaceEvenly,
               children: [
                 FilterChip(
-                  label: const Text("Easy", style: TextStyle(color: Colors.white, fontSize: 18)),
+                  label: const Text("Easy", style: TextStyle(color: Colors.black, fontSize: 18)),
                   selected: true,
-                  backgroundColor: Colors.lightGreen,
-                  selectedColor: Colors.lightGreen,
-                  checkmarkColor: Colors.white,
+                  backgroundColor: Colors.green.shade300,
+                  selectedColor: Colors.green.shade300,
+                  checkmarkColor: Colors.black,
                   onSelected: (_) {},
                 ),
                 FilterChip(
-                  label: const Text("Normal", style: TextStyle(color: Colors.white, fontSize: 18)),
+                  label: const Text("Normal", style: TextStyle(color: Colors.black, fontSize: 18)),
                   selected: true,
-                  backgroundColor: Colors.amber,
-                  selectedColor: Colors.amber,
-                  checkmarkColor: Colors.white,
+                  backgroundColor: Colors.orange.shade300,
+                  selectedColor: Colors.orange.shade300,
+                  checkmarkColor: Colors.black,
                   onSelected: (_) {},
                 ),
                 FilterChip(
-                  label: const Text("Hard", style: TextStyle(color: Colors.white, fontSize: 18)),
+                  label: const Text("Hard", style: TextStyle(color: Colors.black, fontSize: 18)),
                   selected: true,
-                  backgroundColor: Colors.red,
-                  selectedColor: Colors.red,
-                  checkmarkColor: Colors.white,
+                  backgroundColor: Colors.red.shade300,
+                  selectedColor: Colors.red.shade300,
+                  checkmarkColor: Colors.black,
                   onSelected: (_) {},
                 ),
               ],
@@ -103,9 +103,9 @@ class ExerciseTile extends StatelessWidget {
   }) : super(key: key);
 
   Color get cardColor {
-    if (exercise.difficulty == 0) return Colors.lightGreen;
-    if (exercise.difficulty == 1) return Colors.amber;
-    if (exercise.difficulty == 2) return Colors.red;
+    if (exercise.difficulty == 0) return Colors.green.shade300;
+    if (exercise.difficulty == 1) return Colors.orange.shade300;
+    if (exercise.difficulty == 2) return Colors.red.shade300;
     return Colors.blueGrey;
   }
 
@@ -116,8 +116,8 @@ class ExerciseTile extends StatelessWidget {
         color: cardColor,
         elevation: 3,
         child: ListTile(
-          iconColor: Colors.white,
-          textColor: Colors.white,
+          iconColor: Colors.black,
+          textColor: Colors.black,
           title: Text(
             exercise.name.toUpperCase(),
             textAlign: TextAlign.center,
@@ -153,11 +153,11 @@ class WalkExerciseTile extends StatelessWidget {
   Widget build(BuildContext context) {
     return Center(
       child: Card(
-        color: Colors.lightGreen,
+        color: Colors.green.shade300,
         elevation: 3,
         child: ListTile(
-          iconColor: Colors.white,
-          textColor: Colors.white,
+          iconColor: Colors.black,
+          textColor: Colors.black,
           title: Text(
             "walk".toUpperCase(),
             textAlign: TextAlign.center,

+ 5 - 0
app/lib/menu/main_page.dart

@@ -30,6 +30,11 @@ class _MainPage extends State<MainPage> {
     return SafeArea(
       child: Scaffold(
         bottomNavigationBar: BottomNavigationBar(
+          selectedItemColor: Colors.blueGrey.shade700,
+          selectedFontSize: 18,
+          selectedLabelStyle: const TextStyle(decoration: TextDecoration.underline),
+          selectedIconTheme: const IconThemeData(size: 32),
+          unselectedItemColor: Colors.black,
           type: BottomNavigationBarType.fixed, // need to specify fixed with more than 3 items
           currentIndex: _selectedIndex,
           onTap: _onMenuTap,