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

AuthorEdmir Suljic<esu@dwarf.dk>
Date2025-06-11 12:58:35 +0200
Mid fix

Changed files

comwell_key_app/assets/translations/da-DK.json     |   4 +-
 comwell_key_app/assets/translations/en-US.json     |   4 +-
 .../booking_details/bloc/booking_details_bloc.dart |   1 -
 .../components/booking_details_bottom_sheet.dart   |  35 +++-
 .../booking_details/components/share_button.dart   |   2 +-
 .../common/components/outlined_pill_button.dart    |  48 ++++++
 .../lib/my_booking/my_booking_page.dart            |  20 +--
 .../lib/overview/components/bookings_tab_view.dart |   3 +-
 .../components/approve_conditions_widget.dart      |   2 +-
 .../lib/payment_cards/payment_cards_page.dart      |   2 +-
 .../pages/prereg_confirmation_page.dart            |  11 +-
 .../components/comwell_text_field.dart             |   2 +-
 .../components/date_time_picker.dart               |   4 +-
 comwell_key_app/lib/routing/app_router.dart        |   1 -
 comwell_key_app/lib/themes/dark_theme.dart         |   6 +-
 comwell_key_app/lib/themes/light_theme.dart        |   6 +-
 comwell_key_app/lib/up_sales/up_sale_widget.dart   | 178 +++++++++++----------
 17 files changed, 211 insertions(+), 118 deletions(-)

Diff

diff --git a/comwell_key_app/assets/translations/da-DK.json b/comwell_key_app/assets/translations/da-DK.json
index 0134df8d..ceccaeb6 100644
--- a/comwell_key_app/assets/translations/da-DK.json
+++ b/comwell_key_app/assets/translations/da-DK.json
@@ -257,6 +257,8 @@
"payment_cards_approve_conditions_subtitle": "betingelserne",
"up_sales_title": "Tidlig check-in",
"up_sales_subtitle": "Med tidlig check-in kan du checke ind kl. 13.00 i stedet for kl. 15.00.",
- "up_sales_popular": "POPULÆR"
+ "up_sales_popular": "POPULÆR",
+ "services": "Tilkøb & Tjenester",
+ "up_sales_see_all": "Se alle"
}
\ No newline at end of file
diff --git a/comwell_key_app/assets/translations/en-US.json b/comwell_key_app/assets/translations/en-US.json
index d4601fee..6c7dfb0b 100644
--- a/comwell_key_app/assets/translations/en-US.json
+++ b/comwell_key_app/assets/translations/en-US.json
@@ -256,5 +256,7 @@
"payment_cards_approve_conditions_subtitle": "terms and conditions",
"up_sales_title": "Early check-in",
"up_sales_subtitle": "With early check-in you can check in at 13.00 instead of 15.00.",
- "up_sales_popular": "POPULAR"
+ "up_sales_popular": "POPULAR",
+ "services": "Upgrades & Services",
+ "up_sales_see_all": "See all"
}
diff --git a/comwell_key_app/lib/booking_details/bloc/booking_details_bloc.dart b/comwell_key_app/lib/booking_details/bloc/booking_details_bloc.dart
index ea269aa7..f1b45974 100644
--- a/comwell_key_app/lib/booking_details/bloc/booking_details_bloc.dart
+++ b/comwell_key_app/lib/booking_details/bloc/booking_details_bloc.dart
@@ -27,7 +27,6 @@ class BookingDetailsBloc
final ProfileRepository profileRepository;
final SeosRepository seosRepository = locator<SeosRepository>();
Duration _remainingTime = Duration.zero;
- final UpSalesCubit upSalesCubit = locator<UpSalesCubit>();
BookingDetailsBloc(
this.booking, {
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 7bf2cbc7..dcca4830 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
@@ -3,6 +3,7 @@ import 'package:comwell_key_app/booking_details/components/check_out_button.dart
import 'package:comwell_key_app/booking_details/components/housekeeping_button.dart';
import 'package:comwell_key_app/booking_details/components/practical_information_button.dart';
import 'package:comwell_key_app/common/components/bottom_sheet_widget.dart';
+import 'package:comwell_key_app/common/components/outlined_pill_button.dart';
import 'package:comwell_key_app/overview/models/booking.dart';
import 'package:comwell_key_app/routing/app_routes.dart';
import 'package:comwell_key_app/up_sales/up_sale_widget.dart';
@@ -18,6 +19,7 @@ class BookingDetailsBottomSheet extends StatelessWidget {
{super.key, required this.cubit, required this.state});
@override
Widget build(BuildContext context) {
+ final theme = Theme.of(context);
return BottomSheetWidget(
widgetChildren: [
cubit.booking.reservationStatus == ReservationStatus.checkedin
@@ -27,7 +29,30 @@ class BookingDetailsBottomSheet extends StatelessWidget {
: const SizedBox(),
const SizedBox(height: 20),
const CheckOutButton(),
- const UpSaleWidget(),
+ const SizedBox(height: 20),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Text('services'.tr(), style: theme.textTheme.headlineMedium),
+ const SizedBox(width: 8),
+ OutlinedPillButton(
+ text: 'up_sales_see_all'.tr(),
+ onTap: () {},
+ ),
+ ],
+ ),
+ const SizedBox(height: 16),
+ const SingleChildScrollView(
+ scrollDirection: Axis.horizontal,
+ child: Row(
+ children: [
+ UpSaleWidget(),
+ UpSaleWidget(),
+ UpSaleWidget(),
+ UpSaleWidget(),
+ ],
+ ),
+ ),
const SizedBox(height: 20),
Text("booking_details_page_practical_information".tr()),
const SizedBox(height: 20),
@@ -43,8 +68,9 @@ class BookingDetailsBottomSheet extends StatelessWidget {
"booking_details_page_hotel_information_button_subtitle"
.tr(),
onClick: () {
- context.pushNamed(AppRoutes.hotelInformation.name,
- );
+ context.pushNamed(
+ AppRoutes.hotelInformation.name,
+ );
}),
),
),
@@ -57,7 +83,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: {'user': cubit.user, 'booking': cubit.booking});
}),
),
),
diff --git a/comwell_key_app/lib/booking_details/components/share_button.dart b/comwell_key_app/lib/booking_details/components/share_button.dart
index 1f3a3ab4..0b644973 100644
--- a/comwell_key_app/lib/booking_details/components/share_button.dart
+++ b/comwell_key_app/lib/booking_details/components/share_button.dart
@@ -58,7 +58,7 @@ class ShareButton extends StatelessWidget {
padding: EdgeInsets.zero,
),
child: Center(
- child: Icon(Icons.add, color: Colors.black.withValues(alpha: 0.65), size: 30),
+ child: Icon(Icons.add, color: colorHeadlineText, size: 30),
),
),
),
diff --git a/comwell_key_app/lib/common/components/outlined_pill_button.dart b/comwell_key_app/lib/common/components/outlined_pill_button.dart
new file mode 100644
index 00000000..947d6c79
--- /dev/null
+++ b/comwell_key_app/lib/common/components/outlined_pill_button.dart
@@ -0,0 +1,48 @@
+import 'package:flutter/material.dart';
+
+class OutlinedPillButton extends StatelessWidget {
+ final String text;
+ final VoidCallback onTap;
+ final Color borderColor;
+ final Color textColor;
+ final double horizontalPadding;
+ final double verticalPadding;
+ final double borderWidth;
+
+ const OutlinedPillButton({
+ super.key,
+ required this.text,
+ required this.onTap,
+ this.borderColor = Colors.black,
+ this.textColor = Colors.black,
+ this.horizontalPadding = 12,
+ this.verticalPadding = 4,
+ this.borderWidth = 1,
+ });
+
+ @override
+ Widget build(BuildContext context) {
+ final theme = Theme.of(context);
+ return Material(
+ color: Colors.transparent,
+ child: InkWell(
+ borderRadius: BorderRadius.circular(32),
+ onTap: onTap,
+ child: Container(
+ padding: EdgeInsets.symmetric(
+ horizontal: horizontalPadding,
+ vertical: verticalPadding,
+ ),
+ decoration: BoxDecoration(
+ border: Border.all(color: borderColor, width: borderWidth),
+ borderRadius: BorderRadius.circular(32),
+ ),
+ child: Text(
+ text,
+ style: theme.textTheme.labelLarge
+ ),
+ ),
+ ),
+ );
+ }
+}
\ No newline at end of file
diff --git a/comwell_key_app/lib/my_booking/my_booking_page.dart b/comwell_key_app/lib/my_booking/my_booking_page.dart
index a6bb3095..0382dc0d 100644
--- a/comwell_key_app/lib/my_booking/my_booking_page.dart
+++ b/comwell_key_app/lib/my_booking/my_booking_page.dart
@@ -44,7 +44,7 @@ class MyBookingPage extends StatelessWidget {
Text(
'booking_reference'.tr(),
style: theme.textTheme.bodySmall?.copyWith(
- color: colorPrimaryText,
+ color: colorHeadlineText,
),
),
Text(
@@ -114,7 +114,7 @@ class MyBookingPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('check_in'.tr(), style: theme.textTheme.bodySmall?.copyWith(
- color: colorPrimaryText,
+ color: colorHeadlineText,
)),
const SizedBox(height: 4),
Text(DateFormat('d. MMM').format(booking.startDate),
@@ -130,7 +130,7 @@ class MyBookingPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('check_out'.tr(), style: theme.textTheme.bodySmall?.copyWith(
- color: colorPrimaryText,
+ color: colorHeadlineText,
)),
const SizedBox(height: 4),
Text(
@@ -154,7 +154,7 @@ class MyBookingPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('booking_details'.tr(), style: theme.textTheme.bodySmall?.copyWith(
- color: colorPrimaryText,
+ color: colorHeadlineText,
)),
Text(booking.roomType, style: theme.textTheme.bodyMedium),
const SizedBox(height: 16),
@@ -162,7 +162,7 @@ class MyBookingPage extends StatelessWidget {
Text(
'number_of_guests'.tr(),
style: theme.textTheme.bodySmall?.copyWith(
- color: colorPrimaryText,
+ color: colorHeadlineText,
),
),
Text(
@@ -173,7 +173,7 @@ class MyBookingPage extends StatelessWidget {
Text(
'booker'.tr(),
style: theme.textTheme.bodySmall?.copyWith(
- color: colorPrimaryText,
+ color: colorHeadlineText,
),
),
Text(booking.booker.name, style: theme.textTheme.bodyMedium),
@@ -189,7 +189,7 @@ class MyBookingPage extends StatelessWidget {
Text(
'share_booking'.tr(),
style: theme.textTheme.bodySmall?.copyWith(
- color: colorPrimaryText,
+ color: colorHeadlineText,
),
),
Text('not_shared'.tr(), style: theme.textTheme.bodyMedium),
@@ -235,7 +235,7 @@ class MyBookingPage extends StatelessWidget {
Column(
children: [
Text('payment_method'.tr(), style: theme.textTheme.bodySmall?.copyWith(
- color: colorPrimaryText,
+ color: colorHeadlineText,
)),
const SizedBox(width: 8),
Text('•••• •••• •••• 1234', style: theme.textTheme.bodyMedium),
@@ -249,7 +249,7 @@ class MyBookingPage extends StatelessWidget {
const Divider(color: colorDivider),
const SizedBox(height: 8),
Text('payment_date'.tr(), style: theme.textTheme.bodySmall?.copyWith(
- color: colorPrimaryText,
+ color: colorHeadlineText,
)),
const SizedBox(height: 4),
Text(DateFormat('d. MMM').format(booking.bookingDate),
@@ -266,7 +266,7 @@ class MyBookingPage extends StatelessWidget {
Text(
'cancellation_policy'.tr(),
style: theme.textTheme.bodySmall?.copyWith(
- color: colorPrimaryText,
+ color: colorHeadlineText,
),
),
const SizedBox(height: 8),
diff --git a/comwell_key_app/lib/overview/components/bookings_tab_view.dart b/comwell_key_app/lib/overview/components/bookings_tab_view.dart
index 1d0ff104..8f24dad1 100644
--- a/comwell_key_app/lib/overview/components/bookings_tab_view.dart
+++ b/comwell_key_app/lib/overview/components/bookings_tab_view.dart
@@ -1,5 +1,6 @@
import 'package:comwell_key_app/overview/components/booking_list_item_view.dart';
import 'package:comwell_key_app/overview/models/booking.dart';
+import 'package:comwell_key_app/themes/light_theme.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
@@ -52,7 +53,7 @@ class BookingsTabView extends StatelessWidget {
textAlign: TextAlign.center,
bookingsSubtitle,
style: theme.textTheme.bodySmall?.copyWith(
- color: Colors.grey.shade500,
+ color: colorHeadlineText,
),
),
diff --git a/comwell_key_app/lib/payment_cards/components/approve_conditions_widget.dart b/comwell_key_app/lib/payment_cards/components/approve_conditions_widget.dart
index a6473942..d8a93c2d 100644
--- a/comwell_key_app/lib/payment_cards/components/approve_conditions_widget.dart
+++ b/comwell_key_app/lib/payment_cards/components/approve_conditions_widget.dart
@@ -31,7 +31,7 @@ class ApproveConditionsWidget extends StatelessWidget {
crossAxisAlignment: WrapCrossAlignment.center,
children: [
Text('payment_cards_approve_conditions_title'.tr(), style: theme.textTheme.bodyMedium?.copyWith(
- color: Colors.black.withValues(alpha: 0.65),
+ color: colorHeadlineText,
)),
Text(
'payment_cards_approve_conditions_subtitle'.tr(),
diff --git a/comwell_key_app/lib/payment_cards/payment_cards_page.dart b/comwell_key_app/lib/payment_cards/payment_cards_page.dart
index cdb4fb7e..b1f3196c 100644
--- a/comwell_key_app/lib/payment_cards/payment_cards_page.dart
+++ b/comwell_key_app/lib/payment_cards/payment_cards_page.dart
@@ -60,7 +60,7 @@ class PaymentCardsPage extends StatelessWidget {
Text(
"payment_cards_subtitle".tr(),
style: Theme.of(context).textTheme.bodySmall?.copyWith(
- color: Colors.black.withValues(alpha: 0.65),
+ color: colorHeadlineText,
),
),
const SizedBox(height: 40),
diff --git a/comwell_key_app/lib/pregistration/pages/prereg_confirmation_page.dart b/comwell_key_app/lib/pregistration/pages/prereg_confirmation_page.dart
index 37ed4e2c..d71ae608 100644
--- a/comwell_key_app/lib/pregistration/pages/prereg_confirmation_page.dart
+++ b/comwell_key_app/lib/pregistration/pages/prereg_confirmation_page.dart
@@ -1,5 +1,6 @@
import 'package:comwell_key_app/pregistration/bloc/preregistration_cubit.dart';
import 'package:comwell_key_app/pregistration/components/information_card.dart';
+import 'package:comwell_key_app/themes/light_theme.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
@@ -34,7 +35,7 @@ class PreregConfirmationPage extends StatelessWidget {
title: "preregistration_confirmation_profile_card_title".tr(),
titleStyle: theme.textTheme.titleMedium?.copyWith(
fontWeight: FontWeight.w500,
- color: Colors.black.withValues(alpha: 0.65),
+ color: colorHeadlineText,
),
onEditClick: cubit.onEditProfileClicked,
child: Column(
@@ -60,7 +61,7 @@ class PreregConfirmationPage extends StatelessWidget {
title: "preregistration_confirmation_address_card_title".tr(),
titleStyle: theme.textTheme.titleMedium?.copyWith(
fontWeight: FontWeight.w500,
- color: Colors.black.withValues(alpha: 0.65),
+ color: colorHeadlineText,
),
onEditClick: cubit.onEditAddressClicked,
child: Column(
@@ -82,7 +83,7 @@ class PreregConfirmationPage extends StatelessWidget {
title: "payment_card_profile_menu".tr(),
titleStyle: theme.textTheme.titleMedium?.copyWith(
fontWeight: FontWeight.w500,
- color: Colors.black.withValues(alpha: 0.65),
+ color: colorHeadlineText,
),
onEditClick: cubit.onPaymentContinueClicked,
child: Column(
@@ -114,7 +115,7 @@ class PreregConfirmationPage extends StatelessWidget {
title: extrasTitleText,
titleStyle: theme.textTheme.titleMedium?.copyWith(
fontWeight: FontWeight.w500,
- color: Colors.black.withValues(alpha: 0.65),
+ color: colorHeadlineText,
),
onEditClick: cubit.onEditExtrasClicked,
child: Column(
@@ -127,7 +128,7 @@ class PreregConfirmationPage extends StatelessWidget {
Text(
"preregistration_confirmation_extras_card_subtitle".tr(),
style: theme.textTheme.bodySmall?.copyWith(
- color: Colors.black.withValues(alpha: 0.65),
+ color: colorHeadlineText,
),
)
],
diff --git a/comwell_key_app/lib/profile_settings/components/comwell_text_field.dart b/comwell_key_app/lib/profile_settings/components/comwell_text_field.dart
index 83d4490f..1e42cb41 100644
--- a/comwell_key_app/lib/profile_settings/components/comwell_text_field.dart
+++ b/comwell_key_app/lib/profile_settings/components/comwell_text_field.dart
@@ -63,7 +63,7 @@ class ComwellTextFieldState extends State<ComwellTextField> {
contentPadding: const EdgeInsets.symmetric(vertical: 0),
),
- style: !widget.readOnly ? theme.textTheme.headlineSmall : theme.textTheme.headlineSmall?.copyWith(color: Colors.black.withValues(alpha: 0.5)),
+ style: !widget.readOnly ? theme.textTheme.headlineSmall : theme.textTheme.headlineSmall?.copyWith(color: colorHeadlineText),
onSubmitted: widget.onSubmitted,
),
),
diff --git a/comwell_key_app/lib/profile_settings/components/date_time_picker.dart b/comwell_key_app/lib/profile_settings/components/date_time_picker.dart
index a4cecd6e..a9332ec7 100644
--- a/comwell_key_app/lib/profile_settings/components/date_time_picker.dart
+++ b/comwell_key_app/lib/profile_settings/components/date_time_picker.dart
@@ -32,13 +32,13 @@ class _DatePickerState extends State<DateTimePicker> {
colorScheme: ColorScheme.light(
primary: sandColor,
onPrimary: Colors.white,
- onSurface: Colors.black.withValues(alpha: 0.65),
+ onSurface: colorHeadlineText,
surface: Colors.white,
onError: Colors.red,
),
textButtonTheme: TextButtonThemeData(
style: TextButton.styleFrom(
- foregroundColor: Colors.black.withValues(alpha: 0.65),
+ foregroundColor: colorHeadlineText,
overlayColor: sandColor,
),
),
diff --git a/comwell_key_app/lib/routing/app_router.dart b/comwell_key_app/lib/routing/app_router.dart
index df08b22b..1fba3afe 100644
--- a/comwell_key_app/lib/routing/app_router.dart
+++ b/comwell_key_app/lib/routing/app_router.dart
@@ -45,7 +45,6 @@ import 'package:comwell_key_app/routing/app_routes.dart';
import 'package:comwell_key_app/routing/go_router_observer.dart';
import 'package:comwell_key_app/share/cubit/share_booking_cubit.dart';
import 'package:comwell_key_app/share/share_booking_page.dart';
-import 'package:comwell_key_app/up_sales/cubit/up_sales_cubit.dart';
import 'package:comwell_key_app/utils/stream_to_listenable.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:go_router/go_router.dart';
diff --git a/comwell_key_app/lib/themes/dark_theme.dart b/comwell_key_app/lib/themes/dark_theme.dart
index 5f9327f2..84a25860 100644
--- a/comwell_key_app/lib/themes/dark_theme.dart
+++ b/comwell_key_app/lib/themes/dark_theme.dart
@@ -20,7 +20,7 @@ ThemeData darkTheme = ThemeData(
headlineSmall: TextStyle(fontSize: 16.0, fontWeight: FontWeight.w600),
bodyMedium: TextStyle(fontSize: 16.0, fontWeight: FontWeight.w600),
bodySmall: TextStyle(fontSize: 14.0, fontWeight: FontWeight.w500)),
- colorScheme: const ColorScheme(
+ colorScheme: ColorScheme(
primary: colorPrimary,
secondary: colorSecondary,
surface: colorBackground,
@@ -34,7 +34,8 @@ ThemeData darkTheme = ThemeData(
tertiaryContainer: colorTertiarySystem,
onError: Colors.white,
brightness: Brightness.light,
- shadow: colorShadow),
+ shadow: colorShadow,
+ surfaceTint: colorHeadlineText),
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(
backgroundColor: sandColor[80],
@@ -63,6 +64,7 @@ const colorTertiaryText = Color(0xFF000000);
const colorTertiarySystem = Color(0xFF000000);
const colorShadow = Color(0xFF000000);
const colorError = Color(0xFFEB0026);
+final colorHeadlineText = colorPrimaryText.withValues(alpha: 0.65);
const int _earthColor = 0xFF677169;
const earthColor = MaterialColor(_earthColor, <int, Color>{
diff --git a/comwell_key_app/lib/themes/light_theme.dart b/comwell_key_app/lib/themes/light_theme.dart
index 27a376e2..dd4b2cb1 100644
--- a/comwell_key_app/lib/themes/light_theme.dart
+++ b/comwell_key_app/lib/themes/light_theme.dart
@@ -38,7 +38,8 @@ ThemeData lightTheme = ThemeData(
tertiaryContainer: colorTertiarySystem,
onError: Colors.white,
brightness: Brightness.light,
- shadow: colorShadow),
+ shadow: colorShadow,
+ surfaceTint: colorHeadlineText),
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(
backgroundColor: sandColor[80],
@@ -58,7 +59,7 @@ ThemeData lightTheme = ThemeData(
const colorPrimary = Color(0xFF677169);
const colorSecondary = Color(0xffF0EAE2);
const colorBackground = Color(0xFFE8E8E8);
-final colorPrimaryText = const Color(0xFF000000).withValues(alpha: 0.65);
+const colorPrimaryText = Color(0xFF000000);
const colorSecondaryText = Color(0xFF000000);
const colorOnPrimaryTextColor = Color(0xFFFFFFFF);
const colorPrimarySystem = Color(0xFF000000);
@@ -69,6 +70,7 @@ const colorTertiarySystem = Color(0xFF000000);
const colorShadow = Color(0xFF000000);
const colorDivider = Color(0xFFE0E0E0);
const disabledButtonColor = Color(0xFFF0F0F0);
+final colorHeadlineText = colorPrimaryText.withValues(alpha: 0.65);
const colorBlack = MaterialColor(0xFF000000, {
75: Color(0xB3000000),
diff --git a/comwell_key_app/lib/up_sales/up_sale_widget.dart b/comwell_key_app/lib/up_sales/up_sale_widget.dart
index 442efb81..ae1056e7 100644
--- a/comwell_key_app/lib/up_sales/up_sale_widget.dart
+++ b/comwell_key_app/lib/up_sales/up_sale_widget.dart
@@ -5,105 +5,115 @@ import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
class UpSaleWidget extends StatelessWidget {
-
const UpSaleWidget({super.key});
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
-
return BlocProvider(
create: (context) => UpSalesCubit(),
- child: BlocBuilder<UpSalesCubit, UpSalesState>(
- builder: (context, state) {
- final cubit = context.read<UpSalesCubit>();
- return Container(
- padding: const EdgeInsets.all(24),
- decoration: BoxDecoration(
- color: Colors.white,
- borderRadius: BorderRadius.circular(24),
- border: Border.all(color: Colors.grey.shade300, width: 2),
- ),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Row(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Expanded(
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Text('Tidlig check-in',
- style: theme.textTheme.headlineMedium),
- ],
- ),
- ),
- Column(
- crossAxisAlignment: CrossAxisAlignment.end,
- children: [
- Row(
+ child: BlocBuilder<UpSalesCubit, UpSalesState>(builder: (context, state) {
+ final cubit = context.read<UpSalesCubit>();
+ return Padding(
+ padding: const EdgeInsets.only(right: 16),
+ child: Container(
+ width: 328,
+ height: 252,
+ padding: const EdgeInsets.all(24),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(24),
+ border: Border.all(color: colorDivider, width: 1),
+ ),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Row(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Expanded(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
children: [
- Text(
- '200 kr.',
- style: theme.textTheme.headlineMedium,
- ),
- const SizedBox(width: 16),
- GestureDetector(
- onTap: cubit.toggleSelected,
- child: Container(
- width: 24,
- height: 24,
- decoration: BoxDecoration(
- shape: BoxShape.circle,
- border: Border.all(color: colorDivider, width: 1),
- ),
- child: cubit.state.selected
- ? Center(
- child: Container(
- width: 12,
- height: 12,
- decoration: BoxDecoration(
- color: theme.primaryColor,
- shape: BoxShape.circle,
- ),
- ),
- )
- : null,
- ),
- ),
+ Text('Tidlig check-in',
+ style: theme.textTheme.headlineMedium),
],
),
- ],
- ),
- ],
- ),
- const SizedBox(height: 32),
- Container(
- padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 8),
- decoration: BoxDecoration(
- color: sandColor,
- borderRadius: BorderRadius.circular(32),
- ),
- child: Text(
- 'POPULÆR',
- style: theme.textTheme.headlineMedium?.copyWith(
- color: Colors.white,
- ),
+ ),
+ Column(
+ crossAxisAlignment: CrossAxisAlignment.end,
+ children: [
+ Row(
+ children: [
+ Text(
+ '200 kr.',
+ style: theme.textTheme.headlineMedium,
+ ),
+ const SizedBox(width: 16),
+ GestureDetector(
+ onTap: cubit.toggleSelected,
+ child: Container(
+ width: 24,
+ height: 24,
+ decoration: BoxDecoration(
+ shape: BoxShape.circle,
+ border:
+ Border.all(color: colorDivider, width: 1),
+ ),
+ child: cubit.state.selected
+ ? Center(
+ child: Container(
+ width: 21,
+ height: 21,
+ decoration: const BoxDecoration(
+ color: sandColor,
+ shape: BoxShape.circle,
+ ),
+ ),
+ )
+ : null,
+ ),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ],
),
- ),
- const SizedBox(height: 24),
- Text(
- 'Med tidlig check-in kan du checke ind kl. 13.00 i stedet for kl. 15.00.',
- style: theme.textTheme.bodyMedium?.copyWith(
- color: colorPrimaryText,
+ Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Container(
+ padding:
+ const EdgeInsets.symmetric(horizontal: 12, vertical: 4),
+ decoration: BoxDecoration(
+ color: sandColor,
+ borderRadius: BorderRadius.circular(32),
+ ),
+ child: Text(
+ 'POPULÆR',
+ style: theme.textTheme.headlineMedium?.copyWith(
+ color: Colors.white,
+ fontSize: 11,
+ ),
+ ),
+ ),
+ const SizedBox(height: 8),
+ Text(
+ 'Med tidlig check-in kan du checke ind kl. 13.00 i stedet for kl. 15.00.',
+ style: theme.textTheme.bodyMedium?.copyWith(
+ color: colorHeadlineText,
+ ),
+ ),
+ ],
),
- ),
- ],
+ ],
+ ),
),
);
- }),
+ }),
);
}
}