6177214e-ce7c-49e3-99de-ff9721b26f63 — Commit 0b3b05ad
Changed files
.../lib/booking_details/booking_details_page.dart | 1 - .../shimmer_loader/booking_details_shimmer_loader.dart | 2 +- .../shimmer_loader/notifications_shimmer_loader.dart | 17 ++++++++++------- .../shimmer_loader/payment_cards_shimmer_loader.dart | 17 ++++++++++------- .../shimmer_loader/prereg_flow_shimmer_loader.dart | 4 ++-- .../shimmer_loader/profile_settings_shimmer_loader.dart | 4 ++-- .../shimmer_loader/settings_shimmer_loader.dart | 2 +- .../shimmer_loader/spa_facility_shimmer_loader.dart | 2 +- .../hotel_information/pages/hotel_information_menu.dart | 2 +- .../lib/notifications/cubit/notifications_cubit.dart | 4 +--- .../lib/notifications/notifications_repository.dart | 2 -- .../overview/components/current_bookings_tab_view.dart | 1 - .../components/approve_conditions_widget.dart | 2 +- .../lib/pregistration/cubit/preregistration_cubit.dart | 4 ++-- .../lib/pregistration/cubit/preregistration_state.dart | 5 ----- 15 files changed, 32 insertions(+), 37 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 2a5cc623..4f36ae25 100644
--- a/comwell_key_app/lib/booking_details/booking_details_page.dart
+++ b/comwell_key_app/lib/booking_details/booking_details_page.dart
@@ -7,7 +7,6 @@ import 'package:comwell_key_app/common/components/comwell_app_bar.dart';
import 'package:comwell_key_app/common/components/shimmer_loader/booking_details_shimmer_loader.dart';
import 'package:comwell_key_app/overview/models/booking.dart';
import 'package:comwell_key_app/routing/app_routes.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';
diff --git a/comwell_key_app/lib/common/components/shimmer_loader/booking_details_shimmer_loader.dart b/comwell_key_app/lib/common/components/shimmer_loader/booking_details_shimmer_loader.dart
index ce05fd8a..b7046ea4 100644
--- a/comwell_key_app/lib/common/components/shimmer_loader/booking_details_shimmer_loader.dart
+++ b/comwell_key_app/lib/common/components/shimmer_loader/booking_details_shimmer_loader.dart
@@ -14,7 +14,7 @@ class BookingDetailsShimmerLoader extends StatelessWidget {
enabled: true,
child: const Column(
mainAxisAlignment: MainAxisAlignment.center,
- children: const [
+ children: [
BannerPlaceholder(),
SizedBox(height: 16),
TitlePlaceholder(width: double.infinity),
diff --git a/comwell_key_app/lib/common/components/shimmer_loader/notifications_shimmer_loader.dart b/comwell_key_app/lib/common/components/shimmer_loader/notifications_shimmer_loader.dart
index 45cb9178..d4841086 100644
--- a/comwell_key_app/lib/common/components/shimmer_loader/notifications_shimmer_loader.dart
+++ b/comwell_key_app/lib/common/components/shimmer_loader/notifications_shimmer_loader.dart
@@ -39,13 +39,16 @@ class NotificationsShimmerLoader extends StatelessWidget {
],
),
const SizedBox(height: 20),
- ...List.generate(4, (index) => Padding(
- padding: const EdgeInsets.symmetric(vertical: 8.0),
- child: ContentPlaceholder(lineType: ContentLineType.twoLines),
- )),
+ ...List.generate(
+ 4,
+ (index) => const Padding(
+ padding: EdgeInsets.symmetric(vertical: 8.0),
+ child: ContentPlaceholder(
+ lineType: ContentLineType.twoLines),
+ )),
const SizedBox(height: 16),
- Padding(
- padding: const EdgeInsets.symmetric(horizontal: 0.0),
+ const Padding(
+ padding: EdgeInsets.symmetric(horizontal: 0.0),
child: SizedBox(
width: double.infinity,
height: 48,
@@ -62,4 +65,4 @@ class NotificationsShimmerLoader extends StatelessWidget {
),
);
}
-}
\ No newline at end of file
+}
diff --git a/comwell_key_app/lib/common/components/shimmer_loader/payment_cards_shimmer_loader.dart b/comwell_key_app/lib/common/components/shimmer_loader/payment_cards_shimmer_loader.dart
index e5af9d54..0e1f047d 100644
--- a/comwell_key_app/lib/common/components/shimmer_loader/payment_cards_shimmer_loader.dart
+++ b/comwell_key_app/lib/common/components/shimmer_loader/payment_cards_shimmer_loader.dart
@@ -21,14 +21,17 @@ class PaymentCardsShimmerLoader extends StatelessWidget {
const SizedBox(height: 40),
const TitlePlaceholder(width: 160),
const SizedBox(height: 20),
- ...List.generate(3, (index) => Padding(
- padding: const EdgeInsets.symmetric(vertical: 8.0),
- child: ContentPlaceholder(lineType: ContentLineType.twoLines),
- )),
+ ...List.generate(
+ 3,
+ (index) => const Padding(
+ padding: EdgeInsets.symmetric(vertical: 8.0),
+ child:
+ ContentPlaceholder(lineType: ContentLineType.twoLines),
+ )),
const SizedBox(height: 12),
// Simulate Add Card button
- Padding(
- padding: const EdgeInsets.symmetric(horizontal: 32.0),
+ const Padding(
+ padding: EdgeInsets.symmetric(horizontal: 32.0),
child: SizedBox(
width: double.infinity,
height: 48,
@@ -45,4 +48,4 @@ class PaymentCardsShimmerLoader extends StatelessWidget {
),
);
}
-}
\ No newline at end of file
+}
diff --git a/comwell_key_app/lib/common/components/shimmer_loader/prereg_flow_shimmer_loader.dart b/comwell_key_app/lib/common/components/shimmer_loader/prereg_flow_shimmer_loader.dart
index 9f924864..e57a7f9e 100644
--- a/comwell_key_app/lib/common/components/shimmer_loader/prereg_flow_shimmer_loader.dart
+++ b/comwell_key_app/lib/common/components/shimmer_loader/prereg_flow_shimmer_loader.dart
@@ -32,8 +32,8 @@ class PreregFlowShimmerLoader extends StatelessWidget {
),
)),
const SizedBox(height: 32),
- Padding(
- padding: const EdgeInsets.symmetric(horizontal: 32.0),
+ const Padding(
+ padding: EdgeInsets.symmetric(horizontal: 32.0),
child: SizedBox(
width: double.infinity,
height: 48,
diff --git a/comwell_key_app/lib/common/components/shimmer_loader/profile_settings_shimmer_loader.dart b/comwell_key_app/lib/common/components/shimmer_loader/profile_settings_shimmer_loader.dart
index 1f86a25f..c7e5ec41 100644
--- a/comwell_key_app/lib/common/components/shimmer_loader/profile_settings_shimmer_loader.dart
+++ b/comwell_key_app/lib/common/components/shimmer_loader/profile_settings_shimmer_loader.dart
@@ -32,8 +32,8 @@ class ProfileSettingsShimmerLoader extends StatelessWidget {
),
)),
const SizedBox(height: 32),
- Padding(
- padding: const EdgeInsets.symmetric(horizontal: 32.0),
+ const Padding(
+ padding: EdgeInsets.symmetric(horizontal: 32.0),
child: SizedBox(
width: double.infinity,
height: 48,
diff --git a/comwell_key_app/lib/common/components/shimmer_loader/settings_shimmer_loader.dart b/comwell_key_app/lib/common/components/shimmer_loader/settings_shimmer_loader.dart
index b76dbccf..d0146bed 100644
--- a/comwell_key_app/lib/common/components/shimmer_loader/settings_shimmer_loader.dart
+++ b/comwell_key_app/lib/common/components/shimmer_loader/settings_shimmer_loader.dart
@@ -17,7 +17,7 @@ class SettingsShimmerLoader extends StatelessWidget {
Container(
width: 24,
height: 24,
- decoration: BoxDecoration(
+ decoration: const BoxDecoration(
color: Colors.white,
shape: BoxShape.circle,
),
diff --git a/comwell_key_app/lib/common/components/shimmer_loader/spa_facility_shimmer_loader.dart b/comwell_key_app/lib/common/components/shimmer_loader/spa_facility_shimmer_loader.dart
index 7582430f..f778a515 100644
--- a/comwell_key_app/lib/common/components/shimmer_loader/spa_facility_shimmer_loader.dart
+++ b/comwell_key_app/lib/common/components/shimmer_loader/spa_facility_shimmer_loader.dart
@@ -11,7 +11,7 @@ class SpaFacilityShimmerLoader extends StatelessWidget {
baseColor: sandColor[40]!,
highlightColor: sandColor[10]!,
enabled: true,
- child: SizedBox(
+ child: const SizedBox(
width: double.infinity,
height: 48,
child: DecoratedBox(
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 4fec9b13..834c3d1a 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
@@ -33,7 +33,7 @@ class HotelInformationMenu extends StatelessWidget {
return Padding(
padding: const EdgeInsets.only(bottom: 6.0),
child: HotelInformationListTile(
- iconPath: facility.icon ?? "assets/icons/ic_info.svg", // TODO: Add icon for facility when cms is updated
+ iconPath: facility.icon,
title: facility.title,
onClick: () {
context.pushNamed(
diff --git a/comwell_key_app/lib/notifications/cubit/notifications_cubit.dart b/comwell_key_app/lib/notifications/cubit/notifications_cubit.dart
index 2adadad5..8fcbf5d5 100644
--- a/comwell_key_app/lib/notifications/cubit/notifications_cubit.dart
+++ b/comwell_key_app/lib/notifications/cubit/notifications_cubit.dart
@@ -40,9 +40,7 @@ class NotificationsCubit extends Cubit<NotificationsState> {
user = await notificationsRepository.fetchUser();
notificationPermissions =
await notificationsRepository.fetchNotificationPermissions(user.id);
-
- print("notificationPermissions: $notificationPermissions");
-
+
notificationPermissions =
_filterVisiblePermissions(notificationPermissions);
emit(NotificationsState(
diff --git a/comwell_key_app/lib/notifications/notifications_repository.dart b/comwell_key_app/lib/notifications/notifications_repository.dart
index bb857d27..c556da6e 100644
--- a/comwell_key_app/lib/notifications/notifications_repository.dart
+++ b/comwell_key_app/lib/notifications/notifications_repository.dart
@@ -37,8 +37,6 @@ class NotificationsRepository {
.map((json) => NotificationPermission.fromJson(json as Json))
.toList();
- print("notificationPermissions: $notificationPermissions");
-
notificationPermissions =
addDescriptionsToPermissions(notificationPermissions);
diff --git a/comwell_key_app/lib/overview/components/current_bookings_tab_view.dart b/comwell_key_app/lib/overview/components/current_bookings_tab_view.dart
index f8db25d6..ee396ca4 100644
--- a/comwell_key_app/lib/overview/components/current_bookings_tab_view.dart
+++ b/comwell_key_app/lib/overview/components/current_bookings_tab_view.dart
@@ -4,7 +4,6 @@ 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_bloc/flutter_bloc.dart';
-import 'package:shimmer/shimmer.dart';
import 'package:comwell_key_app/common/components/shimmer_loader/overview_shimmer_loader.dart';
class CurrentBookingsTabView extends StatelessWidget {
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 6783a924..b5832598 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
@@ -21,7 +21,7 @@ class ApproveConditionsWidget extends StatelessWidget {
activeColor: sandColor,
checkColor: Colors.white,
side: const BorderSide(color: Colors.grey),
- value: cubit.state.termsAccepted,
+ value: cubit.state.termsAndConditionsAccepted,
onChanged: (value) {
cubit.onTermsAndConditionsToggled(value ?? false);
},
diff --git a/comwell_key_app/lib/pregistration/cubit/preregistration_cubit.dart b/comwell_key_app/lib/pregistration/cubit/preregistration_cubit.dart
index 3eec8077..7138564d 100644
--- a/comwell_key_app/lib/pregistration/cubit/preregistration_cubit.dart
+++ b/comwell_key_app/lib/pregistration/cubit/preregistration_cubit.dart
@@ -317,7 +317,7 @@ class PreregistrationCubit extends Cubit<PreregistrationState> {
case PreregistrationPage.address:
return isAddressValid && isPostalCodeValid && isCityValid;
case PreregistrationPage.payment:
- return state.termsAccepted;
+ return state.termsAndConditionsAccepted;
case PreregistrationPage.upSales:
return true;
case PreregistrationPage.confirmation:
@@ -346,7 +346,7 @@ class PreregistrationCubit extends Cubit<PreregistrationState> {
}
void onTermsAndConditionsToggled(bool toggle) {
- emit(state.copyWith(termsAccepted: toggle));
+ emit(state.copyWith(termsAndConditionsAccepted: toggle));
}
void addSelected(RoomUpgrade roomUpgrade) {
diff --git a/comwell_key_app/lib/pregistration/cubit/preregistration_state.dart b/comwell_key_app/lib/pregistration/cubit/preregistration_state.dart
index 495df08c..d842d56e 100644
--- a/comwell_key_app/lib/pregistration/cubit/preregistration_state.dart
+++ b/comwell_key_app/lib/pregistration/cubit/preregistration_state.dart
@@ -16,8 +16,6 @@ class PreregistrationState extends UpSalesState {
final bool isPhoneNumberValid;
final bool isFirstNameValid;
final bool isLastNameValid;
- @override
- final bool termsAccepted;
final bool isAddressValid;
final bool isPostalCodeValid;
final bool isCityValid;
@@ -39,7 +37,6 @@ class PreregistrationState extends UpSalesState {
this.isPhoneNumberValid = false,
this.isFirstNameValid = false,
this.isLastNameValid = false,
- this.termsAccepted = false,
this.isAddressValid = false,
this.isPostalCodeValid = false,
this.isCityValid = false,
@@ -60,7 +57,6 @@ class PreregistrationState extends UpSalesState {
isPhoneNumberValid,
isFirstNameValid,
isLastNameValid,
- termsAccepted,
isAddressValid,
isPostalCodeValid,
isCityValid,
@@ -107,7 +103,6 @@ class PreregistrationState extends UpSalesState {
isPhoneNumberValid: isPhoneNumberValid ?? this.isPhoneNumberValid,
isFirstNameValid: isFirstNameValid ?? this.isFirstNameValid,
isLastNameValid: isLastNameValid ?? this.isLastNameValid,
- termsAccepted: termsAccepted ?? this.termsAccepted,
isAddressValid: isAddressValid ?? this.isAddressValid,
isPostalCodeValid: isPostalCodeValid ?? this.isPostalCodeValid,
isCityValid: isCityValid ?? this.isCityValid,