#17 Accessible UI

병합
iwa-13 iwa-13/feature/ui-accessibility 에서 iwa-13/main 로 3 commits 를 머지했습니다 3 년 전

+ 1 - 0
app/lib/challenge/daily_challenge_page.dart

@@ -8,6 +8,7 @@ class DailyChallengePage extends StatelessWidget {
   @override
   Widget build(BuildContext context) {
     return Scaffold(
+      appBar: AppBar(iconTheme: const IconThemeData(color: Colors.white, size: 36), ),
       body: Padding(
         padding: const EdgeInsets.all(16.0),
         child: Column(

+ 3 - 0
app/lib/challenge/weekly_challenge_page.dart

@@ -20,6 +20,9 @@ class WeeklyChallengePage extends StatelessWidget {
           final weeklyPlaceName = weeklyPlace["name"];
           final weeklyPlaceLocation = weeklyPlace["location"]["geopoint"];
           return Scaffold(
+            appBar: AppBar(
+              iconTheme: const IconThemeData(color: Colors.white, size: 36),
+            ),
             body: Padding(
               padding: const EdgeInsets.all(16.0),
               child: Column(

+ 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,

+ 15 - 2
app/lib/exercises/exercises_validation/widgets/exercise_indicator.dart

@@ -59,13 +59,26 @@ class ExerciseIndicator extends StatelessWidget {
             return Column(
               children: [
                 Text(
-                  "${repCounter % exercise.repetitions}/${exercise.repetitions}",
+                  "Reps: ${repCounter % exercise.repetitions}/${exercise.repetitions}",
                   style: const TextStyle(fontSize: 40),
                 ),
                 Text(
-                  "${repCounter ~/ exercise.repetitions}/${exercise.sets}",
+                  "Sets: ${repCounter ~/ exercise.repetitions}/${exercise.sets}",
                   style: const TextStyle(fontSize: 40),
                 ),
+                const SizedBox(height: 10),
+                ElevatedButton(
+                  onPressed: () => Navigator.pop(context),
+                  style: ElevatedButton.styleFrom(
+                    padding: const EdgeInsets.symmetric(vertical: 16, horizontal: 32),
+                  ),
+                  child: const Text("BACK",
+                      style: TextStyle(
+                        fontSize: 20,
+                        fontWeight: FontWeight.bold,
+                        letterSpacing: 1.3,
+                      )),
+                )
               ],
             );
           },

+ 6 - 3
app/lib/friends/widgets/friends_list.dart

@@ -13,7 +13,6 @@ class FriendsList extends StatefulWidget {
 }
 
 class _FriendsListState extends State<FriendsList> {
-
   void _shareLocation(String friendId) async {
     try {
       await ChallengeLocationService.shareChallengeLocation(friendId);
@@ -58,8 +57,12 @@ class _FriendsListState extends State<FriendsList> {
   Widget _friendTile(Friend friend) {
     return Card(
       child: ListTile(
-        title: Text("${friend.name} ${friend.surname}"),
-        trailing: TextButton(
+        title: Text(
+          "${friend.name} ${friend.surname}",
+          textAlign: TextAlign.center,
+          style: const TextStyle(fontSize: 18),
+        ),
+        subtitle: TextButton(
           child: const Text("Share challenge location"),
           onPressed: () => _shareLocation(friend.id),
         ),

+ 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,