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

AuthorMikkel Thygesen<mikkelet@gmail.com>
Date2026-02-15 00:43:27 +0100
2085: updated some assets

Changed files

.../lib/booking_details/booking_details_page.dart  | 75 ++++++++++++----------
 .../pages/hotel_information_menu.dart              | 12 ++--
 .../components/housekeeping_service.dart           | 12 ++--
 .../lib/up_sales/pages/services_upgrade_page.dart  |  4 +-
 4 files changed, 55 insertions(+), 48 deletions(-)

Diff

diff --git a/comwell_key_app/lib/booking_details/booking_details_page.dart b/comwell_key_app/lib/booking_details/booking_details_page.dart
index 54c306fa..33a342f9 100644
--- a/comwell_key_app/lib/booking_details/booking_details_page.dart
+++ b/comwell_key_app/lib/booking_details/booking_details_page.dart
@@ -15,6 +15,7 @@ import 'package:flutter/services.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:go_router/go_router.dart';
+import '../.generated/assets/assets.gen.dart';
import 'bloc/booking_details_bloc.dart';
import 'components/unlock_room_button.dart';
@@ -33,36 +34,40 @@ class BookingDetailsPage extends StatelessWidget {
}
return Scaffold(
- extendBodyBehindAppBar: true,
- backgroundColor: colorBackground,
- appBar: const ComwellAppBar(),
- body: Builder(
- builder: (context) {
- if (state.isLoading) {
- return const Center(
- child: BookingDetailsShimmerLoader(),
- );
- } else {
- return _buildBookingDetailsPage(context, state, cubit);
- }
- },
- ));
+ extendBodyBehindAppBar: true,
+ backgroundColor: colorBackground,
+ appBar: const ComwellAppBar(),
+ body: Builder(
+ builder: (context) {
+ if (state.isLoading) {
+ return const Center(
+ child: BookingDetailsShimmerLoader(),
+ );
+ } else {
+ return _buildBookingDetailsPage(context, state, cubit);
+ }
+ },
+ ),
+ );
},
);
}
- Widget _buildBookingDetailsPage(BuildContext context,
- BookingDetailsState state, BookingDetailsBloc cubit) {
+ Widget _buildBookingDetailsPage(
+ BuildContext context,
+ BookingDetailsState state,
+ BookingDetailsBloc cubit,
+ ) {
final theme = Theme.of(context);
final screenHeight = MediaQuery.of(context).size.height;
-
+
return Stack(
children: [
// Background image - fixed
Container(
- decoration: const BoxDecoration(
+ decoration: BoxDecoration(
image: DecorationImage(
- image: AssetImage('assets/images/booking_background.png'),
+ image: AssetImage(Assets.images.bookingBackground.path),
fit: BoxFit.cover,
),
),
@@ -81,15 +86,13 @@ class BookingDetailsPage extends StatelessWidget {
),
),
// Share button - fixed at top
- if (cubit.booking.reservationStatus ==
- ReservationStatus.preregistered ||
- cubit.booking.reservationStatus ==
- ReservationStatus.preregistered ||
+ if (cubit.booking.reservationStatus == ReservationStatus.preregistered ||
+ cubit.booking.reservationStatus == ReservationStatus.preregistered ||
cubit.booking.reservationStatus == ReservationStatus.checkedin)
SafeArea(
- child: cubit.booking.isPrimaryGuest &&
- cubit.booking.reservationStatus ==
- ReservationStatus.checkedin
+ child:
+ cubit.booking.isPrimaryGuest &&
+ cubit.booking.reservationStatus == ReservationStatus.checkedin
? ShareButton(guests: state.guests)
: const SizedBox(),
),
@@ -106,8 +109,12 @@ class BookingDetailsPage extends StatelessWidget {
);
}
- Widget _buildBookingDetailsInformation(BuildContext context,
- BookingDetailsState state, BookingDetailsBloc cubit, ThemeData theme) {
+ Widget _buildBookingDetailsInformation(
+ BuildContext context,
+ BookingDetailsState state,
+ BookingDetailsBloc cubit,
+ ThemeData theme,
+ ) {
return InkWell(
onTap: () async {
await context.push(AppRoutes.myBooking, extra: cubit.booking);
@@ -137,8 +144,7 @@ class BookingDetailsPage extends StatelessWidget {
children: [
Text(
cubit.booking.confirmationNumber,
- style: theme.textTheme.labelLarge
- ?.copyWith(color: colorBackground),
+ style: theme.textTheme.labelLarge?.copyWith(color: colorBackground),
),
Text(
cubit.booking.toRoomType(),
@@ -182,8 +188,7 @@ class _ScrollableBookingContent extends StatefulWidget {
});
@override
- State<_ScrollableBookingContent> createState() =>
- _ScrollableBookingContentState();
+ State<_ScrollableBookingContent> createState() => _ScrollableBookingContentState();
}
class _ScrollableBookingContentState extends State<_ScrollableBookingContent> {
@@ -228,10 +233,10 @@ class _ScrollableBookingContentState extends State<_ScrollableBookingContent> {
if (widget.state.keys.isNotEmpty &&
widget.cubit.booking.roomNumber != '' &&
widget.state.keys.any(
- (key) => key.label == widget.cubit.booking.roomNumber))
+ (key) => key.label == widget.cubit.booking.roomNumber,
+ ))
UnlockRoomButton(roomNumber: widget.cubit.booking.roomNumber)
- else if (widget.cubit.booking.reservationStatus ==
- ReservationStatus.checkedin)
+ else if (widget.cubit.booking.reservationStatus == ReservationStatus.checkedin)
const GetKeysButton()
else if (widget.cubit.booking.reservationStatus ==
ReservationStatus.preregistered)
diff --git a/comwell_key_app/lib/hotel_information/pages/hotel_information_menu.dart b/comwell_key_app/lib/hotel_information/pages/hotel_information_menu.dart
index f73ee58d..87b60a37 100644
--- a/comwell_key_app/lib/hotel_information/pages/hotel_information_menu.dart
+++ b/comwell_key_app/lib/hotel_information/pages/hotel_information_menu.dart
@@ -15,7 +15,7 @@ class HotelInformationMenu extends StatelessWidget {
Widget build(BuildContext context) {
final cubit = context.read<HotelInformationCubit>();
final hotel = cubit.hotel;
-
+
return Column(
children: [
ImageWidget(image: hotel.image),
@@ -26,8 +26,7 @@ class HotelInformationMenu extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
- Text(hotel.hotelName,
- style: Theme.of(context).textTheme.headlineLarge),
+ Text(hotel.hotelName, style: Theme.of(context).textTheme.headlineLarge),
const SizedBox(height: 16),
...hotel.facilities.map((facility) {
return Padding(
@@ -36,9 +35,10 @@ class HotelInformationMenu extends StatelessWidget {
iconPath: facility.icon,
title: facility.title,
onClick: () {
- context.pushNamed(
- "${AppRoutes.hotelInformation}${AppRoutes.facility}",
- extra: facility);
+ context.push(
+ "${AppRoutes.hotelInformation}${AppRoutes.facility}",
+ extra: facility,
+ );
},
),
);
diff --git a/comwell_key_app/lib/housekeeping/components/housekeeping_service.dart b/comwell_key_app/lib/housekeeping/components/housekeeping_service.dart
index 737322aa..67dc8436 100644
--- a/comwell_key_app/lib/housekeeping/components/housekeeping_service.dart
+++ b/comwell_key_app/lib/housekeeping/components/housekeeping_service.dart
@@ -1,3 +1,5 @@
+import 'package:comwell_key_app/.generated/assets/assets.gen.dart';
+
enum HouseKeepingService {
cleaning,
towels,
@@ -23,15 +25,15 @@ enum HouseKeepingService {
String get assetId {
switch (this) {
case HouseKeepingService.cleaning:
- return "assets/icons/icon_housekeeping_cleaning.svg";
+ return Assets.icons.iconHousekeepingCleaning.path;
case HouseKeepingService.towels:
- return "assets/icons/icon_housekeeping_towels.svg";
+ return Assets.icons.iconHousekeepingTowels.path;
case HouseKeepingService.refill:
- return "assets/icons/icon_housekeeping_coffee.svg";
+ return Assets.icons.iconHousekeepingCoffee.path;
case HouseKeepingService.trash:
- return "assets/icons/icon_housekeeping_trash.svg";
+ return Assets.icons.iconHousekeepingTrash.path;
case HouseKeepingService.soap:
- return "assets/icons/icon_housekeeping_soap.svg";
+ return Assets.icons.iconHousekeepingSoap.path;
}
}
diff --git a/comwell_key_app/lib/up_sales/pages/services_upgrade_page.dart b/comwell_key_app/lib/up_sales/pages/services_upgrade_page.dart
index 47f15056..9d7cedc0 100644
--- a/comwell_key_app/lib/up_sales/pages/services_upgrade_page.dart
+++ b/comwell_key_app/lib/up_sales/pages/services_upgrade_page.dart
@@ -1,3 +1,4 @@
+import 'package:comwell_key_app/.generated/assets/assets.gen.dart';
import 'package:comwell_key_app/common/components/comwell_app_bar.dart';
import 'package:comwell_key_app/routing/app_routes.dart';
import 'package:comwell_key_app/themes/light_theme.dart';
@@ -43,8 +44,7 @@ class ServicesUpgradePage extends StatelessWidget {
topLeft: Radius.circular(10),
topRight: Radius.circular(10),
),
- child: Image.asset(
- 'assets/images/welcome_image.jpeg',
+ child: Assets.images.welcomeImage.image(
height: height * 0.5,
width: double.infinity,
fit: BoxFit.cover,