6177214e-ce7c-49e3-99de-ff9721b26f63 — Commit bb3c5399
Changed files
comwell_key_app/assets/translations/da-DK.json | 4 +- comwell_key_app/assets/translations/en-US.json | 4 +- .../Pods-Runner/Pods-Runner-resources.sh | 162 --------------------- .../ios/Runner.xcodeproj/project.pbxproj | 97 +++++++++++- comwell_key_app/ios/Runner/Info.plist | 14 +- .../manifest.json | 1 - .../authentication/authentication_repository.dart | 8 +- .../booking_details/bloc/booking_details_bloc.dart | 3 +- .../bloc/booking_details_state.dart | 2 +- .../lib/booking_details/booking_details_page.dart | 2 - .../booking_details_repository.dart | 1 - .../booking_details/components/share_button.dart | 1 - comwell_key_app/lib/check_in/check_in_page.dart | 2 - .../lib/check_out/bloc/check_out_cubit.dart | 4 +- .../check_out/pages/check_out_processing_page.dart | 3 +- .../common/components/comwell_card_component.dart | 4 +- comwell_key_app/lib/comwell_app.dart | 1 - comwell_key_app/lib/database/comwell_db.dart | 2 - .../lib/database/daos/bookings_dao.dart | 3 - .../lib/housekeeping/housekeeping_page.dart | 4 +- .../lib/login/components/azure_b2c_widget.dart | 1 - comwell_key_app/lib/login/login_page.dart | 60 +++++++- comwell_key_app/lib/main.dart | 2 +- .../lib/my_booking/my_booking_page.dart | 7 +- .../lib/my_booking/my_booking_repository.dart | 2 - .../lib/notifications/notifications_page.dart | 2 +- .../components/current_bookings_tab_view.dart | 2 +- .../lib/overview/cubit/overview_cubit.dart | 5 +- comwell_key_app/lib/overview/models/bookings.dart | 2 - comwell_key_app/lib/overview/overview_page.dart | 2 - .../past_cancelled_booking_detail_page.dart | 2 - .../overview/repository/overview_repository.dart | 1 - .../payment_cards/bloc/payment_cards_cubit.dart | 3 +- .../payment_cards/components/edit_card_dialog.dart | 9 +- .../components/remove_card_button.dart | 2 +- .../payment_cards/components/save_card_button.dart | 1 - .../lib/payment_cards/payment_cards_page.dart | 1 - .../pregistration/bloc/preregistration_cubit.dart | 15 +- .../pages/prereg_confirmation_page.dart | 4 +- .../comwell_club_signup_bottom_sheet.dart | 16 +- .../lib/profile/cubit/profile_cubit.dart | 2 - comwell_key_app/lib/profile/profile_page.dart | 3 - .../components/address_bottom_sheet.dart | 3 - .../components/comwell_text_field.dart | 3 - .../components/date_time_picker.dart | 5 +- .../components/intl_phone_field.dart | 1 - .../cubit/profile_settings_cubit.dart | 5 +- .../lib/profile_settings/model/user.dart | 1 - .../profile_settings/profile_settings_page.dart | 2 +- .../repostiory/profile_settings_repository.dart | 1 - .../redeem_debug/invitation_code_formatter.dart | 4 +- comwell_key_app/lib/routing/app_router.dart | 4 +- comwell_key_app/lib/services/api.dart | 8 +- .../interceptors/response_handle_interceptor.dart | 2 +- .../lib/tracking/trackers/firebase_tracker.dart | 6 +- comwell_key_app/lib/utils/locator.dart | 1 - .../lib/utils/stream_to_listenable.dart | 11 +- .../booking_details_repository_test.dart | 9 +- .../test/overview_test/overview_cubic_test.dart | 1 - .../overview_test/overview_repository_test.dart | 1 - comwell_key_app/test/widget_test.dart | 2 +- 61 files changed, 226 insertions(+), 310 deletions(-)
Diff
diff --git a/comwell_key_app/assets/translations/da-DK.json b/comwell_key_app/assets/translations/da-DK.json
index f504185e..f951cfd1 100644
--- a/comwell_key_app/assets/translations/da-DK.json
+++ b/comwell_key_app/assets/translations/da-DK.json
@@ -241,5 +241,7 @@
"total_charge_value": "{} kr.",
"generic_error_profile_page": "Der skete en fejl. Prøv igen senere. Eller log ud og prøv igen.",
"profile_error_name": "Fejl ved indlæsning af profiloplysninger",
- "error": "Fejl"
+ "error": "Fejl",
+ "error_logout": "Der skete en fejl",
+ "error_logout_subtitle": "Du har været logget ud. Log venligst ind igen."
}
\ No newline at end of file
diff --git a/comwell_key_app/assets/translations/en-US.json b/comwell_key_app/assets/translations/en-US.json
index 0e35b884..6241d1fb 100644
--- a/comwell_key_app/assets/translations/en-US.json
+++ b/comwell_key_app/assets/translations/en-US.json
@@ -241,5 +241,7 @@
"total_charge_value": "{} kr.",
"generic_error_profile_page": "An error occurred. Please try again later. Or logout and try again.",
"profile_error_name": "Failed to load profile information",
- "error": "Error"
+ "error": "Error",
+ "error_logout": "There has been an error",
+ "error_logout_subtitle": "Please log in again"
}
diff --git a/comwell_key_app/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-resources.sh b/comwell_key_app/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-resources.sh
deleted file mode 100755
index 8ad0afb6..00000000
--- a/comwell_key_app/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-resources.sh
+++ /dev/null
@@ -1,162 +0,0 @@
-#!/bin/sh
-set -e
-set -u
-set -o pipefail
-
-function on_error {
- echo "$(realpath -mq "${0}"):$1: error: Unexpected failure"
-}
-trap 'on_error $LINENO' ERR
-
-if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then
- # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy
- # resources to, so exit 0 (signalling the script phase was successful).
- exit 0
-fi
-
-mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
-
-RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
-> "$RESOURCES_TO_COPY"
-
-XCASSET_FILES=()
-
-# This protects against multiple targets copying the same framework dependency at the same time. The solution
-# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
-RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
-
-case "${TARGETED_DEVICE_FAMILY:-}" in
- 1,2)
- TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone"
- ;;
- 1)
- TARGET_DEVICE_ARGS="--target-device iphone"
- ;;
- 2)
- TARGET_DEVICE_ARGS="--target-device ipad"
- ;;
- 3)
- TARGET_DEVICE_ARGS="--target-device tv"
- ;;
- 4)
- TARGET_DEVICE_ARGS="--target-device watch"
- ;;
- *)
- TARGET_DEVICE_ARGS="--target-device mac"
- ;;
-esac
-
-install_resource()
-{
- if [[ "$1" = /* ]] ; then
- RESOURCE_PATH="$1"
- else
- RESOURCE_PATH="${PODS_ROOT}/$1"
- fi
- if [[ ! -e "$RESOURCE_PATH" ]] ; then
- cat << EOM
-error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script.
-EOM
- exit 1
- fi
- case $RESOURCE_PATH in
- *.storyboard)
- echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true
- ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
- ;;
- *.xib)
- echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true
- ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
- ;;
- *.framework)
- echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
- mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
- echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
- rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
- ;;
- *.xcdatamodel)
- echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true
- xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom"
- ;;
- *.xcdatamodeld)
- echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true
- xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd"
- ;;
- *.xcmappingmodel)
- echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true
- xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm"
- ;;
- *.xcassets)
- ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH"
- XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE")
- ;;
- *)
- echo "$RESOURCE_PATH" || true
- echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY"
- ;;
- esac
-}
-if [[ "$CONFIGURATION" == "Debug" ]]; then
- install_resource "${PODS_CONFIGURATION_BUILD_DIR}/permission_handler_apple/permission_handler_apple_privacy.bundle"
-fi
-if [[ "$CONFIGURATION" == "Debug-debugtest" ]]; then
- install_resource "${PODS_CONFIGURATION_BUILD_DIR}/permission_handler_apple/permission_handler_apple_privacy.bundle"
-fi
-if [[ "$CONFIGURATION" == "Debug-develop" ]]; then
- install_resource "${PODS_CONFIGURATION_BUILD_DIR}/permission_handler_apple/permission_handler_apple_privacy.bundle"
-fi
-if [[ "$CONFIGURATION" == "Release" ]]; then
- install_resource "${PODS_CONFIGURATION_BUILD_DIR}/permission_handler_apple/permission_handler_apple_privacy.bundle"
-fi
-if [[ "$CONFIGURATION" == "Release-Prod" ]]; then
- install_resource "${PODS_CONFIGURATION_BUILD_DIR}/permission_handler_apple/permission_handler_apple_privacy.bundle"
-fi
-if [[ "$CONFIGURATION" == "Release-Stage" ]]; then
- install_resource "${PODS_CONFIGURATION_BUILD_DIR}/permission_handler_apple/permission_handler_apple_privacy.bundle"
-fi
-if [[ "$CONFIGURATION" == "Release-releasetest" ]]; then
- install_resource "${PODS_CONFIGURATION_BUILD_DIR}/permission_handler_apple/permission_handler_apple_privacy.bundle"
-fi
-if [[ "$CONFIGURATION" == "Profile" ]]; then
- install_resource "${PODS_CONFIGURATION_BUILD_DIR}/permission_handler_apple/permission_handler_apple_privacy.bundle"
-fi
-if [[ "$CONFIGURATION" == "Develop" ]]; then
- install_resource "${PODS_CONFIGURATION_BUILD_DIR}/permission_handler_apple/permission_handler_apple_privacy.bundle"
-fi
-if [[ "$CONFIGURATION" == "Test-Debug" ]]; then
- install_resource "${PODS_CONFIGURATION_BUILD_DIR}/permission_handler_apple/permission_handler_apple_privacy.bundle"
-fi
-if [[ "$CONFIGURATION" == "Test-Release" ]]; then
- install_resource "${PODS_CONFIGURATION_BUILD_DIR}/permission_handler_apple/permission_handler_apple_privacy.bundle"
-fi
-if [[ "$CONFIGURATION" == "Stage" ]]; then
- install_resource "${PODS_CONFIGURATION_BUILD_DIR}/permission_handler_apple/permission_handler_apple_privacy.bundle"
-fi
-if [[ "$CONFIGURATION" == "Prod" ]]; then
- install_resource "${PODS_CONFIGURATION_BUILD_DIR}/permission_handler_apple/permission_handler_apple_privacy.bundle"
-fi
-
-mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
-rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
-if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then
- mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
- rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
-fi
-rm -f "$RESOURCES_TO_COPY"
-
-if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ]
-then
- # Find all other xcassets (this unfortunately includes those of path pods and other targets).
- OTHER_XCASSETS=$(find -L "$PWD" -iname "*.xcassets" -type d)
- while read line; do
- if [[ $line != "${PODS_ROOT}*" ]]; then
- XCASSET_FILES+=("$line")
- fi
- done <<<"$OTHER_XCASSETS"
-
- if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then
- printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
- else
- printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist"
- fi
-fi
diff --git a/comwell_key_app/ios/Runner.xcodeproj/project.pbxproj b/comwell_key_app/ios/Runner.xcodeproj/project.pbxproj
index a9ce385d..7d7542f2 100644
--- a/comwell_key_app/ios/Runner.xcodeproj/project.pbxproj
+++ b/comwell_key_app/ios/Runner.xcodeproj/project.pbxproj
@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
- objectVersion = 54;
+ objectVersion = 60;
objects = {
/* Begin PBXBuildFile section */
@@ -54,6 +54,7 @@
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
9DB5D744F222AF809D0EF6AC /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
+ A04B4A7043BF9616A795D245 /* Pods-Runner.debug-stage.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug-stage.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug-stage.xcconfig"; sourceTree = "<group>"; };
A4335E7A08A94C23664353EF /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
ABE3404FC02B427934355159 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
AD9174E615F0B41D5035C8F2 /* Pods-Runner.release-releasetest.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release-releasetest.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release-releasetest.xcconfig"; sourceTree = "<group>"; };
@@ -95,6 +96,7 @@
318A697BE77A1E954F6664E4 /* Pods-Runner.release-stage.xcconfig */,
AD9174E615F0B41D5035C8F2 /* Pods-Runner.release-releasetest.xcconfig */,
ABE3404FC02B427934355159 /* Pods-Runner.profile.xcconfig */,
+ A04B4A7043BF9616A795D245 /* Pods-Runner.debug-stage.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
@@ -233,10 +235,14 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
+ inputPaths = (
+ );
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
+ outputPaths = (
+ );
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
@@ -338,10 +344,14 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
);
+ inputPaths = (
+ );
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
);
+ outputPaths = (
+ );
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
@@ -399,6 +409,89 @@
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
+ 167B3F642DD32D08005BA376 /* Debug-Stage */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_TESTABILITY = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+ MTL_ENABLE_DEBUG_INFO = YES;
+ ONLY_ACTIVE_ARCH = NO;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = "Debug-Stage";
+ };
+ 167B3F652DD32D08005BA376 /* Debug-Stage */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
+ CODE_SIGN_IDENTITY = "Apple Development";
+ CODE_SIGN_STYLE = Automatic;
+ DEVELOPMENT_TEAM = 8RNV6AX4ZL;
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ INFOPLIST_KEY_CFBundleDisplayName = "Comwell Hotels";
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.comwell.phoenix.stage;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ PROVISIONING_PROFILE_SPECIFIER = "";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ SWIFT_VERSION = 5.0;
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = "Debug-Stage";
+ };
249021D3217E4FDB00AE95B9 /* Profile */ = {
isa = XCBuildConfiguration;
buildSettings = {
@@ -1057,6 +1150,7 @@
isa = XCConfigurationList;
buildConfigurations = (
97C147031CF9000F007C117D /* Debug */,
+ 167B3F642DD32D08005BA376 /* Debug-Stage */,
6073D2BD2C59042900183654 /* Debug-debugtest */,
6073D2A72C58F8E600183654 /* Debug-develop */,
97C147041CF9000F007C117D /* Release */,
@@ -1072,6 +1166,7 @@
isa = XCConfigurationList;
buildConfigurations = (
97C147061CF9000F007C117D /* Debug */,
+ 167B3F652DD32D08005BA376 /* Debug-Stage */,
6073D2BE2C59042900183654 /* Debug-debugtest */,
6073D2A82C58F8E600183654 /* Debug-develop */,
97C147071CF9000F007C117D /* Release */,
diff --git a/comwell_key_app/ios/Runner/Info.plist b/comwell_key_app/ios/Runner/Info.plist
index 0c5bcc58..a08bdc75 100644
--- a/comwell_key_app/ios/Runner/Info.plist
+++ b/comwell_key_app/ios/Runner/Info.plist
@@ -8,8 +8,6 @@
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>$(PRODUCT_NAME)</string>
- <key>FIREBASE_ANALYTICS_COLLECTION_ENABLED</key>
- <false/>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
@@ -44,6 +42,13 @@
</array>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
+ <key>FIREBASE_ANALYTICS_COLLECTION_ENABLED</key>
+ <false/>
+ <key>LSApplicationQueriesSchemes</key>
+ <array>
+ <string>sms</string>
+ <string>tel</string>
+ </array>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSBluetoothAlwaysUsageDescription</key>
@@ -84,10 +89,5 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
- <key>LSApplicationQueriesSchemes</key>
-<array>
- <string>sms</string>
- <string>tel</string>
-</array>
</dict>
</plist>
diff --git a/comwell_key_app/ios/build/XCBuildData/8c3b049d5d268dd432fe7a1551a7b9ed.xcbuilddata/manifest.json b/comwell_key_app/ios/build/XCBuildData/8c3b049d5d268dd432fe7a1551a7b9ed.xcbuilddata/manifest.json
deleted file mode 100644
index 7391713b..00000000
--- a/comwell_key_app/ios/build/XCBuildData/8c3b049d5d268dd432fe7a1551a7b9ed.xcbuilddata/manifest.json
+++ /dev/null
@@ -1 +0,0 @@
-{"client":{"name":"basic","version":0,"file-system":"device-agnostic","perform-ownership-analysis":"no"},"targets":{"":["<all>"]},"commands":{"<all>":{"tool":"phony","inputs":["<WorkspaceHeaderMapVFSFilesWritten>"],"outputs":["<all>"]},"P0:::Gate WorkspaceHeaderMapVFSFilesWritten":{"tool":"phony","inputs":[],"outputs":["<WorkspaceHeaderMapVFSFilesWritten>"]}}}
\ No newline at end of file
diff --git a/comwell_key_app/lib/authentication/authentication_repository.dart b/comwell_key_app/lib/authentication/authentication_repository.dart
index a603adf5..c5ab35d8 100644
--- a/comwell_key_app/lib/authentication/authentication_repository.dart
+++ b/comwell_key_app/lib/authentication/authentication_repository.dart
@@ -23,22 +23,19 @@ class AuthenticationRepository {
AuthenticationRepository() {
broadcast.listen((status) {
- print('status $status');
statusBuffer = status;
});
_controller.sink.add(AuthenticationStatus.unknown);
-
FirebaseAnalytics.instance.setUserProperty(
name: 'login_status',
value: 'false',
-
);
}
- Stream<AuthenticationStatus> get status async* {
- yield* broadcast.map((status) {
+ Stream<AuthenticationStatus> get status {
+ return _controller.stream.map((status) {
_onAuthResult(status);
return status;
});
@@ -64,7 +61,6 @@ class AuthenticationRepository {
}
Future<void> logOut({bool forced = false}) async {
- print('logOut $forced');
await secureStorage.deleteAll();
await database.deleteDatabase();
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 bc1865b7..fdc652fd 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,5 +1,4 @@
import 'package:bloc/bloc.dart';
-import 'package:comwell_key_app/database/comwell_db.dart';
import 'package:comwell_key_app/overview/models/guest.dart';
import 'package:comwell_key_app/utils/seos_repository.dart';
import 'package:equatable/equatable.dart';
@@ -70,7 +69,7 @@ class BookingDetailsBloc
try {
//TODO: add this when we have the backend
// await bookingDetailsRepository.updateBooking(event.booking);
- emit(state.updateGuests(event.booking.guests ?? []));
+ emit(state.updateGuests(event.booking.guests));
} catch (e) {
emit(state.setupError());
}
diff --git a/comwell_key_app/lib/booking_details/bloc/booking_details_state.dart b/comwell_key_app/lib/booking_details/bloc/booking_details_state.dart
index ad6442f4..81b806d4 100644
--- a/comwell_key_app/lib/booking_details/bloc/booking_details_state.dart
+++ b/comwell_key_app/lib/booking_details/bloc/booking_details_state.dart
@@ -20,7 +20,7 @@ class BookingDetailsState extends Equatable {
key: null,
keys: [],
isHouseKeepingOrdered: false,
- guests: booking.guests ?? []);
+ guests: booking.guests);
BookingDetailsState setupError() =>
copyWith(status: BookingDetailsStatus.setupError);
BookingDetailsState updateKeys(List<MobileKeysKey> keys) =>
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 f18fa41e..9161ab02 100644
--- a/comwell_key_app/lib/booking_details/booking_details_page.dart
+++ b/comwell_key_app/lib/booking_details/booking_details_page.dart
@@ -7,8 +7,6 @@ import 'package:comwell_key_app/booking_details/components/housekeeping_button.d
import 'package:comwell_key_app/booking_details/components/practical_information_button.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:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
diff --git a/comwell_key_app/lib/booking_details/booking_details_repository.dart b/comwell_key_app/lib/booking_details/booking_details_repository.dart
index f752770b..364e4d81 100644
--- a/comwell_key_app/lib/booking_details/booking_details_repository.dart
+++ b/comwell_key_app/lib/booking_details/booking_details_repository.dart
@@ -1,7 +1,6 @@
import 'package:comwell_key_app/database/comwell_db.dart';
import 'package:comwell_key_app/housekeeping/housekeeping_repository.dart';
import 'package:comwell_key_app/overview/models/booking.dart';
-import 'package:comwell_key_app/overview/models/guest.dart';
import 'package:comwell_key_app/services/api.dart';
import 'package:comwell_key_app/services/mappers/booking_mapper.dart';
import 'package:comwell_key_app/utils/locator.dart';
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 9179d3d2..7320f5c2 100644
--- a/comwell_key_app/lib/booking_details/components/share_button.dart
+++ b/comwell_key_app/lib/booking_details/components/share_button.dart
@@ -1,5 +1,4 @@
import 'package:comwell_key_app/booking_details/bloc/booking_details_bloc.dart';
-import 'package:comwell_key_app/overview/models/booking.dart';
import 'package:comwell_key_app/overview/models/guest.dart';
import 'package:comwell_key_app/routing/app_routes.dart';
import 'package:comwell_key_app/booking_details/components/guest_list.dart';
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 472bf50f..d26b0933 100644
--- a/comwell_key_app/lib/check_in/check_in_page.dart
+++ b/comwell_key_app/lib/check_in/check_in_page.dart
@@ -5,7 +5,6 @@ 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:go_router/go_router.dart';
import 'package:lottie/lottie.dart';
@@ -105,7 +104,6 @@ class _CheckInPageState extends State<CheckInPage>
@override
Widget build(BuildContext context) {
- final mq = MediaQuery.of(context);
return BlocConsumer<CheckInCubit, CheckInState>(listener: (context, state) {
switch (state.checkInStatus) {
case CheckInStatusInitial _:
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 5b66a771..d45ef9a2 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
@@ -8,8 +8,6 @@ import 'package:comwell_key_app/check_out/pages/check_out_page.dart';
import 'package:comwell_key_app/overview/models/booking.dart';
import 'package:comwell_key_app/payment_cards/pregistration/pregistration_repository.dart';
import 'package:comwell_key_app/profile/profile_repository.dart';
-import 'package:comwell_key_app/profile_settings/repostiory/profile_settings_repository.dart';
-import 'package:comwell_key_app/services/adyen/adyen_amount.dart';
import 'package:comwell_key_app/utils/locator.dart';
import 'package:flutter/material.dart';
@@ -29,7 +27,7 @@ class CheckoutCubit extends Cubit<CheckoutState> {
void init() async {
try {
final user = await profileRepository.fetchProfileSettings();
- emit(state.clubPointsFetched(user!.points ?? 0));
+ emit(state.clubPointsFetched(user.points));
} catch (e) {
// Todo handle error
}
diff --git a/comwell_key_app/lib/check_out/pages/check_out_processing_page.dart b/comwell_key_app/lib/check_out/pages/check_out_processing_page.dart
index d9a27890..a5903ff7 100644
--- a/comwell_key_app/lib/check_out/pages/check_out_processing_page.dart
+++ b/comwell_key_app/lib/check_out/pages/check_out_processing_page.dart
@@ -121,11 +121,10 @@ class _CheckOutProcessingPageState extends State<CheckOutProcessingPage>
"brands": ["mc", "visa"]
},
onPaymentResult: (result) {
- print("qqq result=$result");
context.pop(result);
},
onUnavailable: () {
- print("qqq unavailable");
+ debugPrint("qqq unavailable");
},
),
const SizedBox(height: 100),
diff --git a/comwell_key_app/lib/common/components/comwell_card_component.dart b/comwell_key_app/lib/common/components/comwell_card_component.dart
index 53307ec8..a13ed0d5 100644
--- a/comwell_key_app/lib/common/components/comwell_card_component.dart
+++ b/comwell_key_app/lib/common/components/comwell_card_component.dart
@@ -12,13 +12,13 @@ class ComwellCard extends StatelessWidget {
final double imageOpacity;
const ComwellCard({
- Key? key,
+ super.key,
required this.content,
this.aspectRatio = 359 / 212,
this.backgroundColor = sandColor,
this.borderRadius = 15,
this.imageOpacity = 0.2,
- }) : super(key: key);
+ });
@override
Widget build(BuildContext context) {
diff --git a/comwell_key_app/lib/comwell_app.dart b/comwell_key_app/lib/comwell_app.dart
index 623e102b..914ceae8 100644
--- a/comwell_key_app/lib/comwell_app.dart
+++ b/comwell_key_app/lib/comwell_app.dart
@@ -1,5 +1,4 @@
import 'package:comwell_key_app/authentication/authentication_repository.dart';
-import 'package:comwell_key_app/authentication/bloc/authentication_bloc.dart';
import 'package:comwell_key_app/booking_details/booking_details_repository.dart';
import 'package:comwell_key_app/key/bloc/key_bloc.dart';
import 'package:comwell_key_app/key/repository/key_repository.dart';
diff --git a/comwell_key_app/lib/database/comwell_db.dart b/comwell_key_app/lib/database/comwell_db.dart
index 0f884433..069efada 100644
--- a/comwell_key_app/lib/database/comwell_db.dart
+++ b/comwell_key_app/lib/database/comwell_db.dart
@@ -54,7 +54,6 @@ class ComwellDatabase extends _$ComwellDatabase {
} else {
return cipher;
}
- print('cipher: $cipher');
return getCipher();
}
@@ -63,7 +62,6 @@ class ComwellDatabase extends _$ComwellDatabase {
final path = await getApplicationSupportDirectory();
final file = File(p.join(path.path, _dbFileName));
final cipher = await getCipher();
- print('cipher: $cipher');
Future<void> isolateSetup() async {
await applyWorkaroundToOpenSqlCipherOnOldAndroidVersions();
open.overrideFor(OperatingSystem.android, openCipherOnAndroid);
diff --git a/comwell_key_app/lib/database/daos/bookings_dao.dart b/comwell_key_app/lib/database/daos/bookings_dao.dart
index 653d7394..2ac3e16e 100644
--- a/comwell_key_app/lib/database/daos/bookings_dao.dart
+++ b/comwell_key_app/lib/database/daos/bookings_dao.dart
@@ -1,8 +1,5 @@
import 'dart:convert';
-
import 'package:comwell_key_app/database/comwell_db.dart';
-import 'package:comwell_key_app/overview/models/bookings.dart';
-import 'package:comwell_key_app/services/mappers/booking_mapper.dart';
import 'package:comwell_key_app/services/models/booking_dto.dart';
import 'package:comwell_key_app/services/models/bookings_dto.dart';
import 'package:comwell_key_app/utils/json.dart';
diff --git a/comwell_key_app/lib/housekeeping/housekeeping_page.dart b/comwell_key_app/lib/housekeeping/housekeeping_page.dart
index d353ac79..d4dd9a11 100644
--- a/comwell_key_app/lib/housekeeping/housekeeping_page.dart
+++ b/comwell_key_app/lib/housekeeping/housekeeping_page.dart
@@ -2,8 +2,6 @@ import 'package:comwell_key_app/housekeeping/components/housekeeping_service.dar
import 'package:comwell_key_app/housekeeping/components/selectable_service.dart';
import 'package:comwell_key_app/housekeeping/housekeeping_cubit.dart';
import 'package:comwell_key_app/housekeeping/housekeeping_state.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';
@@ -45,7 +43,7 @@ class _HousekeepingPageState extends State<HousekeepingPage> {
child: ElevatedButton(
onPressed: () async {
await cubit.onOrderHousekeepingClicked();
- if (mounted) {
+ if (context.mounted) {
context.pop();
}
},
diff --git a/comwell_key_app/lib/login/components/azure_b2c_widget.dart b/comwell_key_app/lib/login/components/azure_b2c_widget.dart
index 2b7ecf24..31ad853c 100644
--- a/comwell_key_app/lib/login/components/azure_b2c_widget.dart
+++ b/comwell_key_app/lib/login/components/azure_b2c_widget.dart
@@ -1,6 +1,5 @@
import 'package:aad_b2c_webview/aad_b2c_webview.dart';
import 'package:comwell_key_app/authentication/authentication_repository.dart';
-import 'package:comwell_key_app/authentication/bloc/authentication_bloc.dart';
import 'package:comwell_key_app/login/auth.dart';
import 'package:comwell_key_app/tracking/comwell_tracking.dart';
import 'package:comwell_key_app/utils/locator.dart';
diff --git a/comwell_key_app/lib/login/login_page.dart b/comwell_key_app/lib/login/login_page.dart
index f67603f9..8a629bb4 100644
--- a/comwell_key_app/lib/login/login_page.dart
+++ b/comwell_key_app/lib/login/login_page.dart
@@ -5,13 +5,14 @@ import 'package:comwell_key_app/login/components/login_button.dart';
import 'package:comwell_key_app/login/components/azure_b2c_widget.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/gestures.dart';
import 'package:flutter/material.dart';
import 'package:modal_bottom_sheet/modal_bottom_sheet.dart';
class LoginPage extends StatelessWidget {
final bool forced;
-
+
const LoginPage({super.key, required this.forced});
@override
@@ -31,8 +32,7 @@ class LoginPage extends StatelessWidget {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
- if (forced)
- Text('forced $forced', style: TextStyle(color: Colors.red, fontSize: 50),),
+ if (forced) _forcedLogoutBanner(context),
// Logo
Expanded(
flex: 3,
@@ -80,10 +80,60 @@ class LoginPage extends StatelessWidget {
width: 400,
child: AzureB2CWidget(
authEnum: authEnum,
- authenticationRepository: locator<AuthenticationRepository>()),
+ authenticationRepository:
+ locator<AuthenticationRepository>()),
),
),
);
});
}
-}
+}
+
+Widget _forcedLogoutBanner(BuildContext context) {
+ final theme = Theme.of(context);
+
+ return Padding(
+ padding: const EdgeInsets.all(16.0),
+ child: Container(
+ height: 100,
+ width: double.infinity,
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(10),
+ ),
+ padding: const EdgeInsets.symmetric(horizontal: 18, vertical: 16),
+ child: Row(
+ children: [
+ Container(
+ width: 64,
+ height: 64,
+ decoration: BoxDecoration(
+ color: Colors.red.withValues(alpha: 0.1),
+ shape: BoxShape.circle,
+ ),
+ child: const Icon(
+ Icons.error_outline,
+ color: Colors.red,
+ size: 36,
+ ),
+ ),
+ const SizedBox(width: 16),
+ Expanded(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text('error_logout'.tr(),
+ style: theme.textTheme.titleMedium!.copyWith(
+ color: Colors.red, fontWeight: FontWeight.bold)),
+ Text('error_logout_subtitle'.tr(),
+ softWrap: true,
+ style:
+ theme.textTheme.bodySmall!.copyWith(color: Colors.red)),
+ ],
+ ),
+ ),
+ ],
+ ),
+ ),
+ );
+}
diff --git a/comwell_key_app/lib/main.dart b/comwell_key_app/lib/main.dart
index 2c474b44..15f5c7e2 100644
--- a/comwell_key_app/lib/main.dart
+++ b/comwell_key_app/lib/main.dart
@@ -33,5 +33,5 @@ void runMainApp(FirebaseOptions firebaseOptions) async {
path:
'assets/translations', // <-- change the path of the translation files
fallbackLocale: const Locale('da', 'DK'),
- child: ComwellApp())));
+ child: const ComwellApp())));
}
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 2a0c655d..71d7e10c 100644
--- a/comwell_key_app/lib/my_booking/my_booking_page.dart
+++ b/comwell_key_app/lib/my_booking/my_booking_page.dart
@@ -1,7 +1,6 @@
import 'package:comwell_key_app/booking_details/bloc/booking_details_bloc.dart';
import 'package:comwell_key_app/booking_details/booking_details_repository.dart';
import 'package:comwell_key_app/booking_details/components/share_button.dart';
-import 'package:comwell_key_app/common/components/bottom_sheet_widget.dart';
import 'package:comwell_key_app/common/components/comwell_app_bar.dart';
import 'package:comwell_key_app/my_booking/components/balance_bottom_sheet.dart';
import 'package:comwell_key_app/overview/models/booking.dart';
@@ -236,9 +235,9 @@ class MyBookingPage extends StatelessWidget {
Column(
children: [
Text('payment_method'.tr(), style: theme.textTheme.bodyMedium),
- SizedBox(width: 8),
+ const SizedBox(width: 8),
Text('•••• •••• •••• 1234', style: theme.textTheme.bodyMedium),
- SizedBox(width: 8),
+ const SizedBox(width: 8),
],
),
Image.asset('assets/images/master.png', width: 42, height: 42),
@@ -303,7 +302,7 @@ class MyBookingPage extends StatelessWidget {
const SizedBox(width: 8),
Icon(
Icons.keyboard_arrow_up,
- color: Colors.white.withOpacity(0.8),
+ color: Colors.white.withValues(alpha: 0.8),
),
],
),
diff --git a/comwell_key_app/lib/my_booking/my_booking_repository.dart b/comwell_key_app/lib/my_booking/my_booking_repository.dart
index c1f6b1e2..78de6ca8 100644
--- a/comwell_key_app/lib/my_booking/my_booking_repository.dart
+++ b/comwell_key_app/lib/my_booking/my_booking_repository.dart
@@ -15,6 +15,4 @@ class MyBookingRepository {
user = await profileRepository.fetchProfileSettings();
return user;
}
-
- fetchBooking() {}
}
diff --git a/comwell_key_app/lib/notifications/notifications_page.dart b/comwell_key_app/lib/notifications/notifications_page.dart
index 44792523..6105aefc 100644
--- a/comwell_key_app/lib/notifications/notifications_page.dart
+++ b/comwell_key_app/lib/notifications/notifications_page.dart
@@ -81,7 +81,7 @@ class NotificationsPage extends StatelessWidget {
child: ElevatedButton(
onPressed: () {
cubit.updatePreferences(
- cubit.state.allNotifications, cubit.user!.id);
+ cubit.state.allNotifications, cubit.user.id);
},
style: ElevatedButton.styleFrom(
backgroundColor: sandColor,
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 4f6b6ac9..29651167 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
@@ -28,7 +28,7 @@ class CurrentBookingsTabView extends StatelessWidget {
Container(
height: 276,
decoration: BoxDecoration(
- image: DecorationImage(
+ image: const DecorationImage(
image: AssetImage("assets/images/no_current_bookings_background.jpeg"),
fit: BoxFit.cover,
),
diff --git a/comwell_key_app/lib/overview/cubit/overview_cubit.dart b/comwell_key_app/lib/overview/cubit/overview_cubit.dart
index 1d82fe2c..165b98f2 100644
--- a/comwell_key_app/lib/overview/cubit/overview_cubit.dart
+++ b/comwell_key_app/lib/overview/cubit/overview_cubit.dart
@@ -85,10 +85,7 @@ class OverviewCubit extends Cubit<OverviewState> {
emit(OverviewLoading());
try {
final bookings = await overviewRepository.fetchAllBookingsForUser();
- final booking = bookings.current.firstWhere((b) => b.id == bookingId,
- orElse: () => bookings.past.firstWhere((b) => b.id == bookingId,
- orElse: () =>
- bookings.cancelled.firstWhere((b) => b.id == bookingId)));
+
emit(OverviewLoaded(bookings: bookings));
} catch (e) {
emit(OverviewError(error: e.toString()));
diff --git a/comwell_key_app/lib/overview/models/bookings.dart b/comwell_key_app/lib/overview/models/bookings.dart
index 8a738cb5..a37b05aa 100644
--- a/comwell_key_app/lib/overview/models/bookings.dart
+++ b/comwell_key_app/lib/overview/models/bookings.dart
@@ -1,7 +1,5 @@
import 'package:comwell_key_app/overview/models/booking.dart';
-import 'package:comwell_key_app/utils/json.dart';
import 'package:equatable/equatable.dart';
-import 'package:json_annotation/json_annotation.dart';
class Bookings extends Equatable {
final Iterable<Booking> current;
diff --git a/comwell_key_app/lib/overview/overview_page.dart b/comwell_key_app/lib/overview/overview_page.dart
index 81ef8930..f872a2e2 100644
--- a/comwell_key_app/lib/overview/overview_page.dart
+++ b/comwell_key_app/lib/overview/overview_page.dart
@@ -6,8 +6,6 @@ import 'package:comwell_key_app/overview/cubit/overview_cubit.dart';
import 'package:comwell_key_app/overview/models/bookings.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:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
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 6922061a..6b767fdd 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
@@ -1,7 +1,5 @@
import 'package:comwell_key_app/common/components/comwell_app_bar.dart';
-import 'package:comwell_key_app/common/components/payment_card_image.dart';
import 'package:comwell_key_app/overview/models/booking.dart';
-import 'package:comwell_key_app/overview/models/payment_details.dart';
import 'package:comwell_key_app/themes/light_theme.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
diff --git a/comwell_key_app/lib/overview/repository/overview_repository.dart b/comwell_key_app/lib/overview/repository/overview_repository.dart
index be36a5e8..62a2a7e2 100644
--- a/comwell_key_app/lib/overview/repository/overview_repository.dart
+++ b/comwell_key_app/lib/overview/repository/overview_repository.dart
@@ -7,7 +7,6 @@ import 'package:comwell_key_app/services/api.dart';
import 'package:comwell_key_app/services/mappers/booking_mapper.dart';
import 'package:comwell_key_app/services/mappers/bookings_mapper.dart';
import 'package:comwell_key_app/services/models/booking_dto.dart';
-import 'package:comwell_key_app/services/models/bookings_dto.dart';
import 'package:comwell_key_app/utils/locator.dart';
class OverviewRepository {
diff --git a/comwell_key_app/lib/payment_cards/bloc/payment_cards_cubit.dart b/comwell_key_app/lib/payment_cards/bloc/payment_cards_cubit.dart
index c3e85d25..67edbd6b 100644
--- a/comwell_key_app/lib/payment_cards/bloc/payment_cards_cubit.dart
+++ b/comwell_key_app/lib/payment_cards/bloc/payment_cards_cubit.dart
@@ -1,7 +1,6 @@
import 'package:adyen_checkout/adyen_checkout.dart';
import 'package:bloc/bloc.dart';
import 'package:comwell_key_app/check_out/models/payment_configurations.dart';
-import 'package:comwell_key_app/overview/repository/overview_repository.dart';
import 'package:comwell_key_app/payment_cards/bloc/payment_cards_state.dart';
import 'package:comwell_key_app/payment_cards/payment_cards_repository.dart';
import 'package:comwell_key_app/payment_cards/pregistration/pregistration_repository.dart';
@@ -56,7 +55,7 @@ class PaymentCardsCubit extends Cubit<PaymentCardsState> {
onSubmit: (data, [extra]) async {
try {
final user = await profileRepository.fetchProfileSettings();
- final shopperRef = user?.shopperReference ?? "Test reference";
+ final shopperRef = user.shopperReference;
final response = await _api.submitPayment(data, shopperRef);
return PaymentEventHandler().handleResponse(jsonResponse: response);
} catch (e) {
diff --git a/comwell_key_app/lib/payment_cards/components/edit_card_dialog.dart b/comwell_key_app/lib/payment_cards/components/edit_card_dialog.dart
index f1529736..a736a310 100644
--- a/comwell_key_app/lib/payment_cards/components/edit_card_dialog.dart
+++ b/comwell_key_app/lib/payment_cards/components/edit_card_dialog.dart
@@ -1,5 +1,4 @@
import 'package:comwell_key_app/payment_cards/components/remove_card_button.dart';
-import 'package:comwell_key_app/payment_cards/components/save_card_button.dart';
import 'package:comwell_key_app/services/adyen/stored_payment_method.dart';
import 'package:comwell_key_app/themes/comwell_colors.dart';
import 'package:easy_localization/easy_localization.dart';
@@ -39,8 +38,8 @@ class EditCardDialog extends StatelessWidget {
style: Theme.of(context).textTheme.bodySmall,
decoration: InputDecoration(
hintText: "card_number_hint".tr(),
- border:
- OutlineInputBorder(borderSide: BorderSide(color: colorDivider)),
+ border: const OutlineInputBorder(
+ borderSide: BorderSide(color: colorDivider)),
),
),
const SizedBox(height: 4),
@@ -52,7 +51,7 @@ class EditCardDialog extends StatelessWidget {
style: Theme.of(context).textTheme.bodySmall,
decoration: InputDecoration(
hintText: "expiry_date_hint".tr(),
- border: OutlineInputBorder(
+ border: const OutlineInputBorder(
borderSide: BorderSide(color: colorDivider)),
),
),
@@ -63,7 +62,7 @@ class EditCardDialog extends StatelessWidget {
style: Theme.of(context).textTheme.bodySmall,
decoration: InputDecoration(
hintText: "cvc_hint".tr(),
- border: OutlineInputBorder(
+ border: const OutlineInputBorder(
borderSide: BorderSide(color: colorDivider)),
),
),
diff --git a/comwell_key_app/lib/payment_cards/components/remove_card_button.dart b/comwell_key_app/lib/payment_cards/components/remove_card_button.dart
index 7455dd7e..2c90dc51 100644
--- a/comwell_key_app/lib/payment_cards/components/remove_card_button.dart
+++ b/comwell_key_app/lib/payment_cards/components/remove_card_button.dart
@@ -32,7 +32,7 @@ class RemoveCardButton extends StatelessWidget {
.textTheme
.bodySmall
?.copyWith(
- color: Colors.black.withOpacity(0.65))),
+ color: Colors.black.withValues(alpha: 0.65))),
MaterialButton(
minWidth: double.infinity,
shape: RoundedRectangleBorder(
diff --git a/comwell_key_app/lib/payment_cards/components/save_card_button.dart b/comwell_key_app/lib/payment_cards/components/save_card_button.dart
index e132f84f..6f949ca0 100644
--- a/comwell_key_app/lib/payment_cards/components/save_card_button.dart
+++ b/comwell_key_app/lib/payment_cards/components/save_card_button.dart
@@ -1,7 +1,6 @@
import 'package:comwell_key_app/themes/comwell_colors.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
-import 'package:go_router/go_router.dart';
class SaveCardButton extends StatelessWidget {
final void Function() onSaveCard;
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 9fdecec1..5f63b532 100644
--- a/comwell_key_app/lib/payment_cards/payment_cards_page.dart
+++ b/comwell_key_app/lib/payment_cards/payment_cards_page.dart
@@ -2,7 +2,6 @@ import 'package:comwell_key_app/common/components/comwell_app_bar.dart';
import 'package:comwell_key_app/payment_cards/bloc/payment_cards_state.dart';
import 'package:comwell_key_app/payment_cards/components/add_card.dart';
import 'package:comwell_key_app/payment_cards/components/edit_card_dialog.dart';
-import 'package:comwell_key_app/payment_cards/components/remove_card_button.dart';
import 'package:comwell_key_app/payment_cards/pregistration/components/card_item.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
diff --git a/comwell_key_app/lib/payment_cards/pregistration/bloc/preregistration_cubit.dart b/comwell_key_app/lib/payment_cards/pregistration/bloc/preregistration_cubit.dart
index f8f36d2b..750d65bc 100644
--- a/comwell_key_app/lib/payment_cards/pregistration/bloc/preregistration_cubit.dart
+++ b/comwell_key_app/lib/payment_cards/pregistration/bloc/preregistration_cubit.dart
@@ -1,9 +1,7 @@
-import 'package:adyen_checkout/src/common/model/payment_result.dart';
import 'package:bloc/bloc.dart';
import 'package:comwell_key_app/payment_cards/pregistration/bloc/preregistration_state.dart';
import 'package:comwell_key_app/payment_cards/pregistration/preregistration_flow.dart';
import 'package:comwell_key_app/profile/profile_repository.dart';
-import 'package:comwell_key_app/profile_settings/repostiory/profile_settings_repository.dart';
import 'package:comwell_key_app/tracking/comwell_tracking.dart';
import 'package:comwell_key_app/tracking/models/analytics_event_item.dart';
import 'package:comwell_key_app/utils/locator.dart';
@@ -35,15 +33,10 @@ class PreregistrationCubit extends Cubit<PreregistrationState> {
emit(state.copyWith(loading: true, error: null));
try {
final user = await _profileRepository.fetchProfileSettings();
- if (user != null) {
- addressTextController.text = user.address?.street ?? "";
- postalCodeTextController.text = user.address?.zipCode ?? "";
- cityTextController.text = user.address?.city ?? "";
- countryTextController.text = user.address?.country ?? "";
- } else {
- emit(state.copyWith(
- loading: false, error: Exception("Der skete en fejl")));
- }
+ addressTextController.text = user.address.street;
+ postalCodeTextController.text = user.address.zipCode;
+ cityTextController.text = user.address.city;
+ countryTextController.text = user.address.country;
} on Exception catch (e) {
emit(state.copyWith(error: e));
}
diff --git a/comwell_key_app/lib/payment_cards/pregistration/pages/prereg_confirmation_page.dart b/comwell_key_app/lib/payment_cards/pregistration/pages/prereg_confirmation_page.dart
index 8ef4a978..0b82ad06 100644
--- a/comwell_key_app/lib/payment_cards/pregistration/pages/prereg_confirmation_page.dart
+++ b/comwell_key_app/lib/payment_cards/pregistration/pages/prereg_confirmation_page.dart
@@ -57,11 +57,11 @@ class PreregConfirmationPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
- user.address?.street ?? "",
+ user.address.street,
style: Theme.of(context).textTheme.bodyMedium,
),
Text(
- "${user.address?.zipCode}, ${user.address?.city}, ${user.address?.country}",
+ "${user.address.zipCode}, ${user.address.city}, ${user.address.country}",
style: Theme.of(context).textTheme.bodyMedium,
),
],
diff --git a/comwell_key_app/lib/profile/components/comwell_club_signup_bottom_sheet.dart b/comwell_key_app/lib/profile/components/comwell_club_signup_bottom_sheet.dart
index 132900fb..ad65aa7b 100644
--- a/comwell_key_app/lib/profile/components/comwell_club_signup_bottom_sheet.dart
+++ b/comwell_key_app/lib/profile/components/comwell_club_signup_bottom_sheet.dart
@@ -56,7 +56,11 @@ class _ComwellClubSignupBottomSheetState
topRight: Radius.circular(24),
),
),
- height: MediaQuery.of(context).copyWith(viewInsets: EdgeInsets.zero).size.height * ComwellClubConstants.imageHeightRatio,
+ height: MediaQuery.of(context)
+ .copyWith(viewInsets: EdgeInsets.zero)
+ .size
+ .height *
+ ComwellClubConstants.imageHeightRatio,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@@ -189,7 +193,8 @@ class _ComwellClubSignupBottomSheetState
text: "tos_accept_link".tr(),
recognizer: TapGestureRecognizer()
..onTap = () {
- launchUrl(Uri.parse(ComwellUrls.clubRules));
+ launchUrl(
+ Uri.parse(ComwellUrls.clubRules));
},
style: TextStyle(
fontSize:
@@ -237,7 +242,8 @@ class _ComwellClubSignupBottomSheetState
text: "read_more".tr(),
recognizer: TapGestureRecognizer()
..onTap = () {
- launchUrl(Uri.parse(ComwellUrls.clubPermission));
+ launchUrl(
+ Uri.parse(ComwellUrls.clubPermission));
},
style: TextStyle(
fontSize: theme.textTheme.bodySmall!.fontSize,
@@ -283,7 +289,9 @@ class _ComwellClubSignupBottomSheetState
: null;
if (response != null) {
- Navigator.pop(context);
+ if (context.mounted) {
+ Navigator.pop(context);
+ }
}
},
child: Text(
diff --git a/comwell_key_app/lib/profile/cubit/profile_cubit.dart b/comwell_key_app/lib/profile/cubit/profile_cubit.dart
index 71612715..3267d150 100644
--- a/comwell_key_app/lib/profile/cubit/profile_cubit.dart
+++ b/comwell_key_app/lib/profile/cubit/profile_cubit.dart
@@ -54,9 +54,7 @@ class ProfileCubit extends Cubit<ProfileState> {
}
void onToSClick(bool? value) async {
- print("onToSClick: ${value}");
emit(state.setToSAccepted(isToSAccepted: value!));
- print("state: ${state.isToSAccepted}");
}
void onNewsletterClick(bool? value) async {
diff --git a/comwell_key_app/lib/profile/profile_page.dart b/comwell_key_app/lib/profile/profile_page.dart
index fcc64a78..f33ea757 100644
--- a/comwell_key_app/lib/profile/profile_page.dart
+++ b/comwell_key_app/lib/profile/profile_page.dart
@@ -1,4 +1,3 @@
-import 'package:comwell_key_app/authentication/bloc/authentication_bloc.dart';
import 'package:comwell_key_app/common/components/comwell_card_component.dart';
import 'package:comwell_key_app/common/components/round_icon_button.dart';
import 'package:comwell_key_app/profile/components/comwell_club_signup_bottom_sheet.dart';
@@ -12,7 +11,6 @@ import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_svg/svg.dart';
import 'package:go_router/go_router.dart';
-import 'package:package_info_plus/package_info_plus.dart';
import 'package:url_launcher/url_launcher.dart';
class ProfilePage extends StatelessWidget {
@@ -42,7 +40,6 @@ class ProfilePage extends StatelessWidget {
}
Widget _buildErrorPage(BuildContext context) {
- final theme = Theme.of(context);
return SafeArea(
child: Column(
children: [
diff --git a/comwell_key_app/lib/profile_settings/components/address_bottom_sheet.dart b/comwell_key_app/lib/profile_settings/components/address_bottom_sheet.dart
index bf1faac9..239ff495 100644
--- a/comwell_key_app/lib/profile_settings/components/address_bottom_sheet.dart
+++ b/comwell_key_app/lib/profile_settings/components/address_bottom_sheet.dart
@@ -1,13 +1,11 @@
import 'package:comwell_key_app/common/components/round_icon_button.dart';
import 'package:comwell_key_app/profile_settings/components/comwell_text_field.dart';
-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/profile_settings/model/user.dart';
import 'package:comwell_key_app/themes/light_theme.dart';
import 'package:country_code_picker/country_code_picker.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
-import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:go_router/go_router.dart';
class AddressBottomSheet extends StatefulWidget {
@@ -50,7 +48,6 @@ class _AddressBottomSheetState extends State<AddressBottomSheet> {
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
- final cubit = context.read<ProfileSettingsCubit>();
return Wrap(children: [
Padding(
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 fd313342..75f4d677 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
@@ -1,7 +1,5 @@
-import 'package:comwell_key_app/profile_settings/cubit/profile_settings_cubit.dart';
import 'package:comwell_key_app/themes/light_theme.dart';
import 'package:flutter/material.dart';
-import 'package:flutter_bloc/flutter_bloc.dart';
class ComwellTextField extends StatefulWidget {
final String fieldName;
@@ -41,7 +39,6 @@ class ComwellTextFieldState extends State<ComwellTextField> {
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
- final cubit = context.read<ProfileSettingsCubit>();
return Container(
height: 62,
decoration: BoxDecoration(
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 e4cbb1e3..4ebb1fd1 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
@@ -34,7 +34,10 @@ class _DatePickerState extends State<DateTimePicker> {
).then((DateTime? selected) {
if (selected != null && selected != _selectedDate) {
setState(() => _selectedDate = selected);
- context.read<ProfileSettingsCubit>().updateBirthDate(selected);
+
+ if (context.mounted) {
+ context.read<ProfileSettingsCubit>().updateBirthDate(selected);
+ }
}
});
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 15441acf..8cf0226d 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
@@ -1,4 +1,3 @@
-import 'package:comwell_key_app/profile_settings/components/comwell_text_field.dart';
import 'package:comwell_key_app/themes/light_theme.dart';
import 'package:country_code_picker/country_code_picker.dart';
import 'package:flutter/material.dart';
diff --git a/comwell_key_app/lib/profile_settings/cubit/profile_settings_cubit.dart b/comwell_key_app/lib/profile_settings/cubit/profile_settings_cubit.dart
index f039e864..52a8f0c3 100644
--- a/comwell_key_app/lib/profile_settings/cubit/profile_settings_cubit.dart
+++ b/comwell_key_app/lib/profile_settings/cubit/profile_settings_cubit.dart
@@ -64,21 +64,18 @@ class ProfileSettingsCubit extends Cubit<ProfileSettingsState> {
}
void updateAddress(Address address) {
- print("update address: ${address}");
final updatedUser = state.user!.copyWith(address: address);
emit(state.userLoaded(user: updatedUser));
}
void updateProfile(User user) async {
- print("update profile: ${user}");
emit(ProfileSettingsState(isLoading: true, user: user, error: null));
try {
- print("user in cubit: $user");
await profileSettingsRepository.updateUser(user);
emit(ProfileSettingsState(isLoading: false, user: user, error: null));
} catch (e) {
- print("error in cubit: $e");
+ debugPrint("error in cubit: $e");
emit(ProfileSettingsState(isLoading: false, user: null, error: Error()));
}
}
diff --git a/comwell_key_app/lib/profile_settings/model/user.dart b/comwell_key_app/lib/profile_settings/model/user.dart
index 80f808bf..5eed41f0 100644
--- a/comwell_key_app/lib/profile_settings/model/user.dart
+++ b/comwell_key_app/lib/profile_settings/model/user.dart
@@ -1,5 +1,4 @@
import 'package:comwell_key_app/profile_settings/model/address.dart';
-import 'package:comwell_key_app/services/models/user_dto.dart';
class User {
final int id;
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 4bdacb23..97ed4044 100644
--- a/comwell_key_app/lib/profile_settings/profile_settings_page.dart
+++ b/comwell_key_app/lib/profile_settings/profile_settings_page.dart
@@ -126,7 +126,7 @@ class ProfileSettingsPage extends StatelessWidget {
if (response is Address) {
cubit.updateAddress(response);
} else {
- print("Not an address $response");
+ debugPrint("Not an address $response");
}
},
showTitle: true),
diff --git a/comwell_key_app/lib/profile_settings/repostiory/profile_settings_repository.dart b/comwell_key_app/lib/profile_settings/repostiory/profile_settings_repository.dart
index 334636a5..7365106c 100644
--- a/comwell_key_app/lib/profile_settings/repostiory/profile_settings_repository.dart
+++ b/comwell_key_app/lib/profile_settings/repostiory/profile_settings_repository.dart
@@ -4,7 +4,6 @@ import 'package:comwell_key_app/profile_settings/model/user.dart';
import 'package:comwell_key_app/services/api.dart';
import 'package:comwell_key_app/services/mappers/user_mapper.dart';
import 'package:comwell_key_app/services/models/user_dto.dart';
-import 'dart:convert';
import 'package:comwell_key_app/utils/json.dart';
import 'package:comwell_key_app/utils/locator.dart';
diff --git a/comwell_key_app/lib/redeem_debug/invitation_code_formatter.dart b/comwell_key_app/lib/redeem_debug/invitation_code_formatter.dart
index af54ee39..7d10efe6 100644
--- a/comwell_key_app/lib/redeem_debug/invitation_code_formatter.dart
+++ b/comwell_key_app/lib/redeem_debug/invitation_code_formatter.dart
@@ -17,7 +17,9 @@ class InvitationCodeFormatter extends TextInputFormatter {
) {
if (newValue.text.length > oldValue.text.length) {
if (newValue.text.characters.last == separator ||
- newValue.text.length > sample.length) return oldValue;
+ newValue.text.length > sample.length) {
+ return oldValue;
+ }
if (newValue.text.length < sample.length &&
sample[newValue.text.length - 1] == separator) {
return TextEditingValue(
diff --git a/comwell_key_app/lib/routing/app_router.dart b/comwell_key_app/lib/routing/app_router.dart
index 4dbc0399..61f43078 100644
--- a/comwell_key_app/lib/routing/app_router.dart
+++ b/comwell_key_app/lib/routing/app_router.dart
@@ -71,7 +71,6 @@ GoRouter goRouter() {
StreamToListenable([authRepo.broadcast]),
redirect: (context, state) async {
final status = authRepo.statusBuffer;
- print('status $status');
final isAuthenticated =
status == AuthenticationStatus.authenticated;
final isUnAuthenticated =
@@ -228,7 +227,7 @@ GoRouter goRouter() {
authenticationRepository:
locator<AuthenticationRepository>())
..init(),
- child: ProfileSettingsPage(),
+ child: const ProfileSettingsPage(),
);
},
routes: [
@@ -301,7 +300,6 @@ GoRouter goRouter() {
builder: (context, state) {
final queryForced = state.uri.queryParameters['forced'] ?? 'false';
final forced = bool.parse(queryForced);
- print('forced $forced');
return LoginPage(forced: forced);
},
),
diff --git a/comwell_key_app/lib/services/api.dart b/comwell_key_app/lib/services/api.dart
index 98c3e254..dcb6a5f3 100644
--- a/comwell_key_app/lib/services/api.dart
+++ b/comwell_key_app/lib/services/api.dart
@@ -78,9 +78,7 @@ class Api {
}
Future<Response<dynamic>> fetchProfileSettings() async {
- print("fetching profile settings");
- final response = await dio.get('/Members/v1/GetGuestProfile');
- print("response in api: $response");
+ final response = await dio.get<Json>('/Members/v1/GetGuestProfile');
return response;
}
@@ -96,7 +94,6 @@ class Api {
};
final json = jsonEncode(body);
- print("json in api: $json");
final response = await dio.post<dynamic>('/Members/v1/ClubSignup', data: json);
return response;
}
@@ -109,7 +106,7 @@ class Api {
]
};
- final response = await dio.put(
+ final response = await dio.put<Json>(
'/Members/v1/guests/$guestId/communication-preference',
data: body,
options: Options(
@@ -140,7 +137,6 @@ class Api {
Future<dynamic> updateUser(UserDto updatedUser) {
final json = jsonEncode(updatedUser);
- print("json in api: $json");
final response = dio.put<void>(
'/Members/v1/UpdateGuestData',
data: json,
diff --git a/comwell_key_app/lib/services/interceptors/response_handle_interceptor.dart b/comwell_key_app/lib/services/interceptors/response_handle_interceptor.dart
index aba7f6b9..c2ab7a89 100644
--- a/comwell_key_app/lib/services/interceptors/response_handle_interceptor.dart
+++ b/comwell_key_app/lib/services/interceptors/response_handle_interceptor.dart
@@ -38,7 +38,7 @@ class ResponseHandleInterceptor extends Interceptor {
return handler.reject(error);
}
options.headers.addAll({
- 'Authorization': 'accessToken',
+ 'Authorization': accessToken,
'Ocp-Apim-Subscription-Key': dotenv.env['OCP_APIM_SUBSCRIPTION_KEY']!,
});
return handler.next(options);
diff --git a/comwell_key_app/lib/tracking/trackers/firebase_tracker.dart b/comwell_key_app/lib/tracking/trackers/firebase_tracker.dart
index 8c1efab5..c73e2740 100644
--- a/comwell_key_app/lib/tracking/trackers/firebase_tracker.dart
+++ b/comwell_key_app/lib/tracking/trackers/firebase_tracker.dart
@@ -51,12 +51,12 @@ class FirebaseTracker {
}
// event names
- static const _eventScreenView = "screen_view";
+ //static const _eventScreenView = "screen_view";
static const _eventAddToCart = "add_to_cart";
static const _eventRemoveFromCart = "remove_from_cart";
static const _eventBeginCheckout = "begin_checkout";
// params
- static const _paramScreenClass = "screen_class";
- static const _paramScreenName = "screen_name";
+ // static const _paramScreenClass = "screen_class";
+ // static const _paramScreenName = "screen_name";
}
diff --git a/comwell_key_app/lib/utils/locator.dart b/comwell_key_app/lib/utils/locator.dart
index 17829734..08489893 100644
--- a/comwell_key_app/lib/utils/locator.dart
+++ b/comwell_key_app/lib/utils/locator.dart
@@ -1,5 +1,4 @@
import 'package:comwell_key_app/authentication/authentication_repository.dart';
-import 'package:comwell_key_app/authentication/bloc/authentication_bloc.dart';
import 'package:comwell_key_app/database/comwell_db.dart';
import 'package:comwell_key_app/hotel_information/repository/hotel_information_repository.dart';
import 'package:comwell_key_app/key/repository/key_repository.dart';
diff --git a/comwell_key_app/lib/utils/stream_to_listenable.dart b/comwell_key_app/lib/utils/stream_to_listenable.dart
index 4dd38aa6..34959378 100644
--- a/comwell_key_app/lib/utils/stream_to_listenable.dart
+++ b/comwell_key_app/lib/utils/stream_to_listenable.dart
@@ -7,22 +7,13 @@ class StreamToListenable extends ChangeNotifier {
late final List<StreamSubscription<dynamic>> subscriptions;
StreamToListenable(List<Stream<dynamic>> streams) {
-
subscriptions = [];
-
- print('streams $streams');
- print('streams length ${streams.length}');
-
for (var e in streams) {
var s = e.asBroadcastStream().listen(_tt);
subscriptions.add(s);
}
-
- print('subscriptions $subscriptions');
- streams.first.single.then((value) {
- print('value $value');
- });
+
notifyListeners();
}
diff --git a/comwell_key_app/test/booking_details_test/booking_details_repository_test.dart b/comwell_key_app/test/booking_details_test/booking_details_repository_test.dart
index b5ff68a7..18b600bf 100644
--- a/comwell_key_app/test/booking_details_test/booking_details_repository_test.dart
+++ b/comwell_key_app/test/booking_details_test/booking_details_repository_test.dart
@@ -1,5 +1,4 @@
// Import necessary testing packages and mockito
-import 'package:comwell_key_app/booking_details/booking_details_repository.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:mockito/mockito.dart';
import 'package:seos_mobile_keys_plugin/seos_mobile_keys_plugin.dart';
@@ -8,14 +7,14 @@ class MockSeosMobileKeysPlugin extends Mock implements SeosMobileKeysPlugin {}
void main() {
// Declare the mock SeosMobileKeysPlugin
- late SeosMobileKeysPlugin mockSeosMobileKeysPlugin;
- late BookingDetailsRepository bookingDetailsRepository;
+ // late SeosMobileKeysPlugin mockSeosMobileKeysPlugin;
+ // late BookingDetailsRepository bookingDetailsRepository;
// Setup function runs before every test
setUp(() {
// Initialize the mock SeosMobileKeysPlugin
TestWidgetsFlutterBinding.ensureInitialized();
- mockSeosMobileKeysPlugin = MockSeosMobileKeysPlugin();
- bookingDetailsRepository = BookingDetailsRepository();
+ // mockSeosMobileKeysPlugin = MockSeosMobileKeysPlugin();
+ // bookingDetailsRepository = BookingDetailsRepository();
});
}
\ No newline at end of file
diff --git a/comwell_key_app/test/overview_test/overview_cubic_test.dart b/comwell_key_app/test/overview_test/overview_cubic_test.dart
index 99b120a5..d4f154ec 100644
--- a/comwell_key_app/test/overview_test/overview_cubic_test.dart
+++ b/comwell_key_app/test/overview_test/overview_cubic_test.dart
@@ -1,6 +1,5 @@
import 'package:bloc_test/bloc_test.dart';
import 'package:comwell_key_app/overview/models/guest.dart';
-import 'package:comwell_key_app/overview/models/payment_details.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:mocktail/mocktail.dart';
import 'package:comwell_key_app/overview/cubit/overview_cubit.dart';
diff --git a/comwell_key_app/test/overview_test/overview_repository_test.dart b/comwell_key_app/test/overview_test/overview_repository_test.dart
index dc1db5ed..d6bad831 100644
--- a/comwell_key_app/test/overview_test/overview_repository_test.dart
+++ b/comwell_key_app/test/overview_test/overview_repository_test.dart
@@ -1,5 +1,4 @@
import 'package:comwell_key_app/overview/models/guest.dart';
-import 'package:comwell_key_app/overview/models/payment_details.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:mocktail/mocktail.dart';
import 'package:comwell_key_app/overview/models/booking.dart';
diff --git a/comwell_key_app/test/widget_test.dart b/comwell_key_app/test/widget_test.dart
index 56823869..00acf59d 100644
--- a/comwell_key_app/test/widget_test.dart
+++ b/comwell_key_app/test/widget_test.dart
@@ -14,7 +14,7 @@ import 'package:flutter_test/flutter_test.dart';
void main() {
testWidgets('Verify Platform version', (WidgetTester tester) async {
// Build our app and trigger a frame.
- await tester.pumpWidget( ComwellApp());
+ await tester.pumpWidget(const ComwellApp());
// Verify that platform version is retrieved.
expect(