6177214e-ce7c-49e3-99de-ff9721b26f63 — Commit 588f57eb

AuthorEdmir Suljic<esu@dwarf.dk>
Date2025-06-11 10:10:14 +0200
Wrong headline color: Fixed bugs

Changed files

.../lib/booking_details/components/share_button.dart |  2 +-
 comwell_key_app/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/themes/dark_theme.dart           |  6 ++++--
 comwell_key_app/lib/themes/light_theme.dart          |  6 ++++--
 10 files changed, 32 insertions(+), 26 deletions(-)

Diff

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/my_booking/my_booking_page.dart b/comwell_key_app/lib/my_booking/my_booking_page.dart
index af32ffca..b9359c79 100644
--- a/comwell_key_app/lib/my_booking/my_booking_page.dart
+++ b/comwell_key_app/lib/my_booking/my_booking_page.dart
@@ -43,7 +43,7 @@ class MyBookingPage extends StatelessWidget {
Text(
'booking_reference'.tr(),
style: theme.textTheme.bodySmall?.copyWith(
- color: colorPrimaryText,
+ color: colorHeadlineText,
),
),
Text(
@@ -113,7 +113,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),
@@ -129,7 +129,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(
@@ -153,7 +153,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),
@@ -161,7 +161,7 @@ class MyBookingPage extends StatelessWidget {
Text(
'number_of_guests'.tr(),
style: theme.textTheme.bodySmall?.copyWith(
- color: colorPrimaryText,
+ color: colorHeadlineText,
),
),
Text(
@@ -172,7 +172,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),
@@ -188,7 +188,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),
@@ -234,7 +234,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),
@@ -248,7 +248,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),
@@ -265,7 +265,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/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),