Selaa lähdekoodia

feat: add back button navigation

Léo Salé 3 vuotta sitten
vanhempi
sitoutus
1f1a4309d5

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

+ 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,
+                      )),
+                )
               ],
             );
           },