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

AuthorMikkel Thygesen<mth@dwarf.dk>
Date2024-12-19 13:39:22 +0100
341: added background decoration to check in card

Changed files

comwell_key_app/assets/images/co.svg            |  4 ++++
 comwell_key_app/assets/images/v.svg             |  3 +++
 comwell_key_app/lib/check_in/check_in_page.dart | 28 ++++++++++++++++++++++---
 3 files changed, 32 insertions(+), 3 deletions(-)

Diff

diff --git a/comwell_key_app/assets/images/co.svg b/comwell_key_app/assets/images/co.svg
new file mode 100644
index 00000000..a513856a
--- /dev/null
+++ b/comwell_key_app/assets/images/co.svg
@@ -0,0 +1,4 @@
+<svg width="305" height="127" viewBox="0 0 305 127" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M149.684 145.709L120.604 132.541C113.197 153.116 92.3473 166.284 66.5594 166.284C29.2494 166.284 3.18718 137.205 3.18718 98.5228C3.18718 59.841 29.2494 31.3098 66.5594 31.3098C90.7012 31.3098 110.728 43.3807 118.958 61.7614L147.764 47.7701C137.339 19.5132 104.418 0.0351562 66.5594 0.0351562C11.143 0.0351562 -30.0078 42.832 -30.0078 98.5228C-30.0078 154.488 11.143 197.559 66.5594 197.559C105.79 197.559 139.808 176.435 149.684 145.709Z" fill="#D7C9B9"/>
+<path d="M235.203 57.9206C195.972 57.9206 165.795 88.0979 165.795 127.877C165.795 167.656 195.972 197.559 235.203 197.559C274.433 197.559 304.885 167.656 304.885 127.877C304.885 88.0979 274.433 57.9206 235.203 57.9206ZM235.203 87.2749C257.424 87.2749 274.708 104.833 274.708 127.877C274.708 150.647 257.424 168.205 235.203 168.205C212.981 168.205 195.972 150.647 195.972 127.877C195.972 104.833 212.981 87.2749 235.203 87.2749Z" fill="#D7C9B9"/>
+</svg>
diff --git a/comwell_key_app/assets/images/v.svg b/comwell_key_app/assets/images/v.svg
new file mode 100644
index 00000000..25464ff1
--- /dev/null
+++ b/comwell_key_app/assets/images/v.svg
@@ -0,0 +1,3 @@
+<svg width="124" height="113" viewBox="0 0 124 113" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M138.815 -22H105.346L69.4077 71.2752L33.195 -22H0L56.2394 112.152H82.576L138.815 -22Z" fill="#D7C9B9"/>
+</svg>
diff --git a/comwell_key_app/lib/check_in/check_in_page.dart b/comwell_key_app/lib/check_in/check_in_page.dart
index 1bff4351..f7b4a593 100644
--- a/comwell_key_app/lib/check_in/check_in_page.dart
+++ b/comwell_key_app/lib/check_in/check_in_page.dart
@@ -4,6 +4,7 @@ import 'package:comwell_key_app/utils/lottie_utils.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
+import 'package:flutter_svg/flutter_svg.dart';
import 'package:lottie/lottie.dart';
class CheckInPage extends StatefulWidget {
@@ -74,12 +75,14 @@ class _CheckInPageState extends State<CheckInPage>
return Container(
decoration: BoxDecoration(
borderRadius: const BorderRadius.all(Radius.circular(30)),
- border: Border.all(color: Colors.white)),
+ border: Border.all(color: Colors.white, width: 2)),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
"${"check_in_your_digital_card_room_prefix".tr()} ${(cubit.state as CheckInStateYourDigitalKeyCard).roomNumber}",
- style: const TextStyle(color: Colors.white),
+ style: Theme.of(context).textTheme.headlineLarge?.copyWith(
+ color: Colors.white,
+ ),
),
),
);
@@ -131,11 +134,30 @@ class _CheckInPageState extends State<CheckInPage>
aspectRatio: 359 / 212,
child: Container(
alignment: Alignment.center,
+ clipBehavior: Clip.antiAlias,
decoration: const BoxDecoration(
color: Color(0xffAA8D65),
borderRadius:
BorderRadius.all(Radius.circular(15))),
- child: getCardContent(context),
+ child: Stack(
+ children: [
+ Align(
+ alignment: Alignment.bottomLeft,
+ child: Opacity(
+ opacity: 0.2,
+ child: SvgPicture.asset(
+ "assets/images/co.svg"))),
+ Align(
+ alignment: Alignment.topRight,
+ child: Opacity(
+ opacity: 0.2,
+ child: SvgPicture.asset(
+ "assets/images/v.svg"))),
+ Align(
+ alignment: Alignment.center,
+ child: getCardContent(context)),
+ ],
+ ),
),
),
const SizedBox(height: 80),