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

AuthorNKL<nikolaj.king@gmail.com>
Date2025-02-21 11:53:00 +0100
clean up

Changed files

.../lib/booking_details/bloc/booking_details_bloc.dart |  1 -
 .../lib/check_out/bloc/check_out_cubit.dart            |  2 +-
 .../check_out/pages/check_out_confirmation_pages.dart  |  1 -
 .../lib/common/components/comwell_text_field.dart      |  2 +-
 comwell_key_app/lib/contact/cubit/contact_cubit.dart   |  1 -
 .../lib/housekeeping/housekeeping_page.dart            |  2 +-
 .../overview/past_cancelled_booking_detail_page.dart   | 18 +++++++++---------
 .../lib/pregistration/bloc/preregistration_cubit.dart  |  8 ++++----
 comwell_key_app/lib/profile/profile_page.dart          |  2 --
 .../profile_settings/components/date_time_picker.dart  | 16 +++++++---------
 .../profile_settings/components/intl_phone_field.dart  |  7 +++----
 .../components/text_field_with_trailing_icon.dart      |  4 +---
 .../lib/profile_settings/profile_settings_page.dart    |  3 ---
 13 files changed, 27 insertions(+), 40 deletions(-)

Diff

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 4a39327d..0fb9a515 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
@@ -1,6 +1,5 @@
import 'package:bloc/bloc.dart';
import 'package:comwell_key_app/database/comwell_db.dart';
-import 'package:comwell_key_app/tracking/comwell_tracking.dart';
import 'package:comwell_key_app/utils/seos_repository.dart';
import 'package:equatable/equatable.dart';
import 'package:flutter/foundation.dart';
diff --git a/comwell_key_app/lib/check_out/bloc/check_out_cubit.dart b/comwell_key_app/lib/check_out/bloc/check_out_cubit.dart
index 14e03239..d7154e02 100644
--- a/comwell_key_app/lib/check_out/bloc/check_out_cubit.dart
+++ b/comwell_key_app/lib/check_out/bloc/check_out_cubit.dart
@@ -19,7 +19,7 @@ class CheckoutCubit extends Cubit<CheckoutState> {
void init() async {
try {
- final user = await profileSettingsRepository.fetchProfileSettings();
+ await profileSettingsRepository.fetchProfileSettings();
} catch (e) {}
}
diff --git a/comwell_key_app/lib/check_out/pages/check_out_confirmation_pages.dart b/comwell_key_app/lib/check_out/pages/check_out_confirmation_pages.dart
index 51c59292..cc1c5090 100644
--- a/comwell_key_app/lib/check_out/pages/check_out_confirmation_pages.dart
+++ b/comwell_key_app/lib/check_out/pages/check_out_confirmation_pages.dart
@@ -1,4 +1,3 @@
-import 'package:comwell_key_app/check_out/components/check_out_countdown.dart';
import 'package:comwell_key_app/check_out/components/check_out_payment_card.dart';
import 'package:comwell_key_app/themes/light_theme.dart';
import 'package:easy_localization/easy_localization.dart';
diff --git a/comwell_key_app/lib/common/components/comwell_text_field.dart b/comwell_key_app/lib/common/components/comwell_text_field.dart
index 11aff9bc..be2a94fe 100644
--- a/comwell_key_app/lib/common/components/comwell_text_field.dart
+++ b/comwell_key_app/lib/common/components/comwell_text_field.dart
@@ -66,7 +66,7 @@ class ComwellTextFieldState extends State<ComwellTextField> {
label: Text(widget.fieldName,
style: _isFocused
? theme.textTheme.bodySmall
- ?.copyWith(color: Colors.black.withOpacity(0.65))
+ ?.copyWith(color: Colors.black.withAlpha((0.65 * 255).toInt()))
: theme.textTheme.headlineSmall
?.copyWith(color: labelTextColor)),
errorBorder: OutlineInputBorder(
diff --git a/comwell_key_app/lib/contact/cubit/contact_cubit.dart b/comwell_key_app/lib/contact/cubit/contact_cubit.dart
index 99fd1a5a..5da5e597 100644
--- a/comwell_key_app/lib/contact/cubit/contact_cubit.dart
+++ b/comwell_key_app/lib/contact/cubit/contact_cubit.dart
@@ -1,6 +1,5 @@
import 'package:bloc/bloc.dart';
import 'package:comwell_key_app/contact/repository/contact_repository.dart';
-import 'package:comwell_key_app/overview/models/bookings.dart';
import 'package:comwell_key_app/overview/repository/overview_repository.dart';
import 'package:equatable/equatable.dart';
diff --git a/comwell_key_app/lib/housekeeping/housekeeping_page.dart b/comwell_key_app/lib/housekeeping/housekeeping_page.dart
index 2a866393..b89b9e76 100644
--- a/comwell_key_app/lib/housekeeping/housekeeping_page.dart
+++ b/comwell_key_app/lib/housekeeping/housekeeping_page.dart
@@ -21,7 +21,7 @@ class HousekeepingPage extends StatefulWidget {
class _HousekeepingPageState extends State<HousekeepingPage> {
@override
Widget build(BuildContext context) {
- locator<ComwellTracking>().trackScreenView('order_housekeeping_page', "/overview//bookingsdetails/housekeeping");
+ locator<ComwellTracking>().trackScreenView('housekeeping_page', "/overview//bookingsdetails/housekeeping");
return BlocProvider(
create: (context) => HouseKeepingCubit(),
child: BlocBuilder<HouseKeepingCubit, HouseKeepingState>(
diff --git a/comwell_key_app/lib/overview/past_cancelled_booking_detail_page.dart b/comwell_key_app/lib/overview/past_cancelled_booking_detail_page.dart
index 86c5e205..191f6f3a 100644
--- a/comwell_key_app/lib/overview/past_cancelled_booking_detail_page.dart
+++ b/comwell_key_app/lib/overview/past_cancelled_booking_detail_page.dart
@@ -35,7 +35,7 @@ class PastCancelledBookingDetailPage extends StatelessWidget {
contentPadding: const EdgeInsets.symmetric(horizontal: 0),
title: Text('booking_reference'.tr(),
style: theme.textTheme.bodySmall
- ?.copyWith(color: Colors.black.withOpacity(0.65))),
+ ?.copyWith(color: Colors.black.withAlpha((0.65 * 255).toInt()))),
subtitle: Text(booking.id, style: theme.textTheme.headlineSmall),
),
const Divider(color: colorDivider),
@@ -51,7 +51,7 @@ class PastCancelledBookingDetailPage extends StatelessWidget {
textAlign: TextAlign.start,
'check_in'.tr(),
style: theme.textTheme.bodySmall?.copyWith(
- color: Colors.black.withOpacity(0.65))),
+ color: Colors.black.withAlpha((0.65 * 255).toInt()))),
Text(
DateFormat('d. MMM yyyy')
.format(booking.startDate)
@@ -67,7 +67,7 @@ class PastCancelledBookingDetailPage extends StatelessWidget {
children: [
Text('check_out'.tr(),
style: theme.textTheme.bodySmall?.copyWith(
- color: Colors.black.withOpacity(0.65))),
+ color: Colors.black.withAlpha((0.65 * 255).toInt()))),
Text(
DateFormat('d. MMM yyyy')
.format(booking.endDate)
@@ -82,7 +82,7 @@ class PastCancelledBookingDetailPage extends StatelessWidget {
contentPadding: const EdgeInsets.symmetric(horizontal: 0),
title: Text('booking_details'.tr(),
style: theme.textTheme.bodySmall
- ?.copyWith(color: Colors.black.withOpacity(0.65))),
+ ?.copyWith(color: Colors.black.withAlpha((0.65 * 255).toInt()))),
subtitle: Text(
booking.roomType,
style: theme.textTheme.headlineSmall,
@@ -93,7 +93,7 @@ class PastCancelledBookingDetailPage extends StatelessWidget {
contentPadding: const EdgeInsets.symmetric(horizontal: 0),
title: Text('number_of_guests'.tr(),
style: theme.textTheme.bodySmall
- ?.copyWith(color: Colors.black.withOpacity(0.65))),
+ ?.copyWith(color: Colors.black.withAlpha((0.65 * 255).toInt()))),
subtitle: Text(
"${booking.adults} ${booking.adults > 1 ? 'adults'.tr() : 'adult'.tr()}${booking.children >= 1 ? ', ${booking.children} ${booking.children > 1 ? 'children'.tr() : 'child'.tr()}' : ''}",
style: theme.textTheme.headlineSmall),
@@ -103,7 +103,7 @@ class PastCancelledBookingDetailPage extends StatelessWidget {
contentPadding: const EdgeInsets.symmetric(horizontal: 0),
title: Text('booker'.tr(),
style: theme.textTheme.bodySmall
- ?.copyWith(color: Colors.black.withOpacity(0.65))),
+ ?.copyWith(color: Colors.black.withAlpha((0.65 * 255).toInt()))),
subtitle:
Text(booking.booker, style: theme.textTheme.headlineSmall),
),
@@ -112,7 +112,7 @@ class PastCancelledBookingDetailPage extends StatelessWidget {
contentPadding: const EdgeInsets.symmetric(horizontal: 0),
title: Text('booking_date'.tr(),
style: theme.textTheme.bodySmall
- ?.copyWith(color: Colors.black.withOpacity(0.65))),
+ ?.copyWith(color: Colors.black.withAlpha((0.65 * 255).toInt()))),
subtitle: Text(
DateFormat('d. MMM yyyy')
.format(booking.bookingDate)
@@ -134,7 +134,7 @@ class PastCancelledBookingDetailPage extends StatelessWidget {
children: [
Text('payment_method'.tr(),
style: theme.textTheme.bodySmall?.copyWith(
- color: Colors.black.withOpacity(0.65))),
+ color: Colors.black.withAlpha((0.65 * 255).toInt()))),
Text(booking.paymentDetails.cardNumber,
style: theme.textTheme.headlineSmall),
]),
@@ -160,7 +160,7 @@ class PastCancelledBookingDetailPage extends StatelessWidget {
children: [
Text('bill'.tr(),
style: theme.textTheme.bodySmall?.copyWith(
- color: Colors.black.withOpacity(0.65))),
+ color: Colors.black.withAlpha((0.65 * 255).toInt()))),
Text('get_bill'.tr(),
style: theme.textTheme.headlineSmall),
]),
diff --git a/comwell_key_app/lib/pregistration/bloc/preregistration_cubit.dart b/comwell_key_app/lib/pregistration/bloc/preregistration_cubit.dart
index 2876a9f4..01f8cdf9 100644
--- a/comwell_key_app/lib/pregistration/bloc/preregistration_cubit.dart
+++ b/comwell_key_app/lib/pregistration/bloc/preregistration_cubit.dart
@@ -257,16 +257,16 @@ class PreregistrationCubit extends Cubit<PreregistrationState> {
Future<void> onPaymentResult(PaymentResult result) async {
switch (result) {
case PaymentAdvancedFinished():
- print("Payment advanced finished");
+ debugPrint("Payment advanced finished");
break;
case PaymentSessionFinished():
- print("Payment session finished");
+ debugPrint("Payment session finished");
break;
case PaymentCancelledByUser():
- print("Session cancelled");
+ debugPrint("Session cancelled");
break;
case PaymentError():
- print("Session error ${result.reason}");
+ debugPrint("Session error ${result.reason}");
break;
}
}
diff --git a/comwell_key_app/lib/profile/profile_page.dart b/comwell_key_app/lib/profile/profile_page.dart
index 464709d3..648707cb 100644
--- a/comwell_key_app/lib/profile/profile_page.dart
+++ b/comwell_key_app/lib/profile/profile_page.dart
@@ -4,8 +4,6 @@ import 'package:comwell_key_app/profile/components/profile_settings_item.dart';
import 'package:comwell_key_app/profile/cubit/profile_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/tracking/comwell_tracking.dart';
-import 'package:comwell_key_app/utils/locator.dart';
import 'package:comwell_key_app/utils/secure_storage.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
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 96433edc..8579ab51 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
@@ -48,15 +48,13 @@ class _DatePickerState extends State<DateTimePicker> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
- Text(
- widget.title,
- textAlign: TextAlign.start,
- style: theme.textTheme.bodySmall?.copyWith(
- color: Colors.black.withOpacity(
- 0.65,
- ),
- ),
- ),
+ Text(widget.title,
+ textAlign: TextAlign.start,
+ style: theme.textTheme.bodySmall?.copyWith(
+ color: Colors.black.withAlpha(
+ (0.65 * 255).toInt(),
+ ),
+ ),),
const SizedBox(height: 0.0),
Text(
_selectedDate != null
diff --git a/comwell_key_app/lib/profile_settings/components/intl_phone_field.dart b/comwell_key_app/lib/profile_settings/components/intl_phone_field.dart
index 65da9bef..91a6ca37 100644
--- a/comwell_key_app/lib/profile_settings/components/intl_phone_field.dart
+++ b/comwell_key_app/lib/profile_settings/components/intl_phone_field.dart
@@ -58,12 +58,11 @@ class IntlPhoneFieldState extends State<IntlPhoneField> {
Text(
widget.title,
textAlign: TextAlign.start,
- style: theme.textTheme.bodySmall?.copyWith(
- color: Colors.black.withOpacity(
- 0.65,
+ style: theme.textTheme.bodySmall?.copyWith(
+ color: Colors.black.withAlpha((0.65 * 255).toInt()),
),
),
- ),
+
const SizedBox(height: 0.0),
Text(widget.phoneNumber, style: theme.textTheme.headlineSmall),
],
diff --git a/comwell_key_app/lib/profile_settings/components/text_field_with_trailing_icon.dart b/comwell_key_app/lib/profile_settings/components/text_field_with_trailing_icon.dart
index deb9bb4d..ac05ccc8 100644
--- a/comwell_key_app/lib/profile_settings/components/text_field_with_trailing_icon.dart
+++ b/comwell_key_app/lib/profile_settings/components/text_field_with_trailing_icon.dart
@@ -42,9 +42,7 @@ class TextFieldWithTrailingIcon extends StatelessWidget {
title,
textAlign: TextAlign.start,
style: theme.textTheme.bodySmall?.copyWith(
- color: Colors.black.withOpacity(
- 0.65,
- ),
+ color: Colors.black.withAlpha((0.65 * 255).toInt())
),
),
const SizedBox(height: 0.0),
diff --git a/comwell_key_app/lib/profile_settings/profile_settings_page.dart b/comwell_key_app/lib/profile_settings/profile_settings_page.dart
index a612ded0..43f3479c 100644
--- a/comwell_key_app/lib/profile_settings/profile_settings_page.dart
+++ b/comwell_key_app/lib/profile_settings/profile_settings_page.dart
@@ -1,4 +1,3 @@
-import 'package:comwell_key_app/authentication/bloc/authentication_bloc.dart';
import 'package:comwell_key_app/common/components/comwell_app_bar.dart';
import 'package:comwell_key_app/common/components/generic_dialog.dart';
import 'package:comwell_key_app/profile_settings/components/address_bottom_sheet.dart';
@@ -9,8 +8,6 @@ import 'package:comwell_key_app/profile_settings/components/text_field_with_trai
import 'package:comwell_key_app/profile_settings/cubit/profile_settings_cubit.dart';
import 'package:comwell_key_app/profile_settings/model/address.dart';
import 'package:comwell_key_app/themes/light_theme.dart';
-import 'package:comwell_key_app/tracking/comwell_tracking.dart';
-import 'package:comwell_key_app/utils/locator.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';