6177214e-ce7c-49e3-99de-ff9721b26f63 — Commit d546aec0

AuthorEdmir Suljic<esu@dwarf.dk>
Date2026-02-27 14:58:55 +0100
checkout navigation bug fix

Changed files

.../xcshareddata/xcschemes/Stage.xcscheme              | 18 ++++++++++++++++++
 .../lib/check_out/pages/check_out_error_page.dart      |  9 ++++++---
 .../lib/check_out/pages/check_out_success_page.dart    |  9 ++++++---
 .../components/booking_details_bottom_sheet.dart       |  3 +--
 .../bluetooth/bluetooth_permission_screen.dart         |  2 +-
 5 files changed, 32 insertions(+), 9 deletions(-)

Diff

diff --git a/comwell_key_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Stage.xcscheme b/comwell_key_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Stage.xcscheme
index c7b91807..e0b155b7 100644
--- a/comwell_key_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Stage.xcscheme
+++ b/comwell_key_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Stage.xcscheme
@@ -6,6 +6,24 @@
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
+ <PreActions>
+ <ExecutionAction
+ ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
+ <ActionContent
+ title = "Run Prepare Flutter Framework Script"
+ scriptText = "/bin/sh &quot;$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh&quot; prepare&#10;">
+ <EnvironmentBuildable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "97C146ED1CF9000F007C117D"
+ BuildableName = "Runner.app"
+ BlueprintName = "Runner"
+ ReferencedContainer = "container:Runner.xcodeproj">
+ </BuildableReference>
+ </EnvironmentBuildable>
+ </ActionContent>
+ </ExecutionAction>
+ </PreActions>
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
diff --git a/comwell_key_app/lib/check_out/pages/check_out_error_page.dart b/comwell_key_app/lib/check_out/pages/check_out_error_page.dart
index d799c386..f4baca15 100644
--- a/comwell_key_app/lib/check_out/pages/check_out_error_page.dart
+++ b/comwell_key_app/lib/check_out/pages/check_out_error_page.dart
@@ -1,13 +1,17 @@
+import 'package:comwell_key_app/check_out/bloc/check_out_cubit.dart';
import 'package:comwell_key_app/routing/app_routes.dart';
import 'package:comwell_key_app/themes/light_theme.dart';
import 'package:comwell_key_app/utils/l10n_utils.dart';
import 'package:flutter/material.dart';
+import 'package:flutter_bloc/flutter_bloc.dart';
+import 'package:go_router/go_router.dart';
class CheckOutErrorPage extends StatelessWidget {
const CheckOutErrorPage({super.key});
@override
Widget build(BuildContext context) {
+ final cubit = context.read<CheckoutCubit>();
return Scaffold(
backgroundColor: sandColor[80],
body: Padding(
@@ -39,9 +43,8 @@ class CheckOutErrorPage extends StatelessWidget {
Expanded(
child: ElevatedButton(
onPressed: () {
- Navigator.of(
- context,
- ).popUntil((route) => route.settings.name == AppRoutes.bookingDetails);
+ context.go(AppRoutes.overview);
+ context.push(AppRoutes.bookingDetails, extra: cubit.booking);
},
style: const ButtonStyle(
backgroundColor: WidgetStatePropertyAll(colorBackground),
diff --git a/comwell_key_app/lib/check_out/pages/check_out_success_page.dart b/comwell_key_app/lib/check_out/pages/check_out_success_page.dart
index e2ccb181..7a204921 100644
--- a/comwell_key_app/lib/check_out/pages/check_out_success_page.dart
+++ b/comwell_key_app/lib/check_out/pages/check_out_success_page.dart
@@ -1,8 +1,11 @@
+import 'package:comwell_key_app/check_out/bloc/check_out_cubit.dart';
import 'package:comwell_key_app/check_out/components/check_out_countdown.dart';
import 'package:comwell_key_app/routing/app_routes.dart';
import 'package:comwell_key_app/themes/light_theme.dart';
import 'package:comwell_key_app/utils/l10n_utils.dart';
import 'package:flutter/material.dart';
+import 'package:flutter_bloc/flutter_bloc.dart';
+import 'package:go_router/go_router.dart';
class CheckOutSuccessPage extends StatelessWidget {
final bool digitalCard;
@@ -11,6 +14,7 @@ class CheckOutSuccessPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
+ final cubit = context.read<CheckoutCubit>();
return Scaffold(
backgroundColor: sandColor[80],
body: Padding(
@@ -45,9 +49,8 @@ class CheckOutSuccessPage extends StatelessWidget {
Expanded(
child: ElevatedButton(
onPressed: () {
- Navigator.of(
- context,
- ).popUntil((route) => route.settings.name == AppRoutes.bookingDetails);
+ context.go(AppRoutes.overview);
+ context.push(AppRoutes.bookingDetails, extra: cubit.booking);
},
style: const ButtonStyle(
backgroundColor: WidgetStatePropertyAll(colorBackground),
diff --git a/comwell_key_app/lib/presentation/screens/booking_details/components/booking_details_bottom_sheet.dart b/comwell_key_app/lib/presentation/screens/booking_details/components/booking_details_bottom_sheet.dart
index 9830155a..63d0bd9c 100644
--- a/comwell_key_app/lib/presentation/screens/booking_details/components/booking_details_bottom_sheet.dart
+++ b/comwell_key_app/lib/presentation/screens/booking_details/components/booking_details_bottom_sheet.dart
@@ -49,8 +49,7 @@ class BookingDetailsBottomSheet extends StatelessWidget {
),
),
const SizedBox(height: 16),
- if (cubit.booking.reservationStatus == ReservationStatus.checkedin &&
- cubit.getCheckOutTime().isBefore(DateTime.now()))
+ if (cubit.booking.reservationStatus == ReservationStatus.checkedin )
const Padding(
padding: EdgeInsets.symmetric(horizontal: 16.0),
child: CheckOutButton(),
diff --git a/comwell_key_app/lib/presentation/screens/onboarding/bluetooth/bluetooth_permission_screen.dart b/comwell_key_app/lib/presentation/screens/onboarding/bluetooth/bluetooth_permission_screen.dart
index 11aa2667..16aed3ee 100644
--- a/comwell_key_app/lib/presentation/screens/onboarding/bluetooth/bluetooth_permission_screen.dart
+++ b/comwell_key_app/lib/presentation/screens/onboarding/bluetooth/bluetooth_permission_screen.dart
@@ -47,7 +47,7 @@ class BluetoothPermissionScreen extends StatelessWidget {
subtitle: context.strings.please_enable_bluetooth,
primaryButtonText: context.strings.generic_ok,
primaryButtonOnClick: () {
- context.pop();
+ context.go(AppRoutes.overview);
},
image: Assets.icons.bluetoothCircled,
);