6177214e-ce7c-49e3-99de-ff9721b26f63 — Commit 206711d7

AuthorEdmir Suljic<esu@dwarf.dk>
Date2025-06-11 13:31:49 +0200
Mid fix

Changed files

.../lib/up_sales/components/facilities_tags.dart   |  0
 comwell_key_app/lib/up_sales/components/tags.dart  | 27 ++++++++++++++++++++++
 comwell_key_app/lib/up_sales/up_sale_widget.dart   | 24 +++++--------------
 3 files changed, 33 insertions(+), 18 deletions(-)

Diff

diff --git a/comwell_key_app/lib/up_sales/components/facilities_tags.dart b/comwell_key_app/lib/up_sales/components/facilities_tags.dart
new file mode 100644
index 00000000..e69de29b
diff --git a/comwell_key_app/lib/up_sales/components/tags.dart b/comwell_key_app/lib/up_sales/components/tags.dart
new file mode 100644
index 00000000..41ad0573
--- /dev/null
+++ b/comwell_key_app/lib/up_sales/components/tags.dart
@@ -0,0 +1,27 @@
+import 'package:comwell_key_app/themes/light_theme.dart';
+import 'package:flutter/material.dart';
+
+class TagWidget extends StatelessWidget {
+ final String text;
+ final Color? textColor;
+ const TagWidget({super.key, required this.text, this.textColor = sandColor});
+
+ @override
+ Widget build(BuildContext context) {
+ final theme = Theme.of(context);
+ return Container(
+ padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 4),
+ decoration: BoxDecoration(
+ color: textColor,
+ borderRadius: BorderRadius.circular(32),
+ ),
+ child: Text(
+ text,
+ style: theme.textTheme.headlineMedium?.copyWith(
+ color: textColor == sandColor ? Colors.white : Colors.black,
+ fontSize: 11,
+ ),
+ ),
+ );
+ }
+}
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 ae1056e7..25e29135 100644
--- a/comwell_key_app/lib/up_sales/up_sale_widget.dart
+++ b/comwell_key_app/lib/up_sales/up_sale_widget.dart
@@ -1,6 +1,8 @@
import 'package:comwell_key_app/themes/light_theme.dart';
+import 'package:comwell_key_app/up_sales/components/tags.dart';
import 'package:comwell_key_app/up_sales/cubit/up_sales_cubit.dart';
import 'package:comwell_key_app/up_sales/cubit/up_sales_state.dart';
+import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
@@ -23,7 +25,7 @@ class UpSaleWidget extends StatelessWidget {
padding: const EdgeInsets.all(24),
decoration: BoxDecoration(
color: Colors.white,
- borderRadius: BorderRadius.circular(24),
+ borderRadius: BorderRadius.circular(12),
border: Border.all(color: colorDivider, width: 1),
),
child: Column(
@@ -37,7 +39,7 @@ class UpSaleWidget extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
- Text('Tidlig check-in',
+ Text('early_checkin'.tr(),
style: theme.textTheme.headlineMedium),
],
),
@@ -51,7 +53,7 @@ class UpSaleWidget extends StatelessWidget {
'200 kr.',
style: theme.textTheme.headlineMedium,
),
- const SizedBox(width: 16),
+ const SizedBox(width: 8),
GestureDetector(
onTap: cubit.toggleSelected,
child: Container(
@@ -85,21 +87,7 @@ class UpSaleWidget extends StatelessWidget {
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 TagWidget(text: 'POPULÆR'),
const SizedBox(height: 8),
Text(
'Med tidlig check-in kan du checke ind kl. 13.00 i stedet for kl. 15.00.',