6177214e-ce7c-49e3-99de-ff9721b26f63 — Commit 057c8ea3
Changed files
.../booking_details/components/booking_details_bottom_sheet.dart | 7 ++++--- comwell_key_app/lib/routing/app_router.dart | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-)
Diff
diff --git a/comwell_key_app/lib/booking_details/components/booking_details_bottom_sheet.dart b/comwell_key_app/lib/booking_details/components/booking_details_bottom_sheet.dart
index 73a4a0b2..e745bdf2 100644
--- a/comwell_key_app/lib/booking_details/components/booking_details_bottom_sheet.dart
+++ b/comwell_key_app/lib/booking_details/components/booking_details_bottom_sheet.dart
@@ -41,8 +41,8 @@ class BookingDetailsBottomSheet extends StatelessWidget {
"booking_details_page_hotel_information_button_subtitle"
.tr(),
onClick: () {
- context.pushNamed(AppRoutes.hotelInformation.name, extra: cubit.booking
- );
+ context.pushNamed(AppRoutes.hotelInformation.name,
+ extra: cubit.booking);
}),
),
),
@@ -55,7 +55,8 @@ class BookingDetailsBottomSheet extends StatelessWidget {
title: "booking_details_page_contact_button_title".tr(),
subtitle: "booking_details_page_contact_button_subtitle".tr(),
onClick: () {
- context.pushNamed(AppRoutes.contact.name, extra: {'user': cubit.user, 'booking': cubit.booking});
+ context.pushNamed(AppRoutes.contact.name,
+ extra: cubit.booking);
}),
),
),
diff --git a/comwell_key_app/lib/routing/app_router.dart b/comwell_key_app/lib/routing/app_router.dart
index 53518a57..11464f08 100644
--- a/comwell_key_app/lib/routing/app_router.dart
+++ b/comwell_key_app/lib/routing/app_router.dart
@@ -159,12 +159,13 @@ GoRouter goRouter() {
path: '/${AppRoutes.contact.name}',
name: AppRoutes.contact.name,
builder: (context, state) {
+ final booking = state.extra as Booking;
return BlocProvider<ContactCubit>(
create: (BuildContext context) => ContactCubit(
contactRepository: locator<ContactRepository>(),
overviewRepository: locator<OverviewRepository>(),
profileRepository: locator<ProfileRepository>())..init(),
- child: const ContactPage(hotelCode: 'CBO'),
+ child: ContactPage(hotelCode: booking.hotelCode),
);
}),
GoRoute(