diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index f6164da..e81acc3 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 51; objects = { /* Begin PBXBuildFile section */ @@ -76,7 +76,6 @@ 3B4D9CAD3B112CCF7FEE1F91 /* Pods-Runner.release.xcconfig */, 3A5ABA8306DCFDB9E71D453A /* Pods-Runner.profile.xcconfig */, ); - name = Pods; path = Pods; sourceTree = ""; }; @@ -140,7 +139,7 @@ 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, AAF25E5FC427CABFCDCC628C /* [CP] Embed Pods Frameworks */, - 8E1FBB2EA6B3AEDD9488054A /* [CP] Copy Pods Resources */, + C4DA18EDC3C1F9369084333D /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -235,23 +234,6 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 8E1FBB2EA6B3AEDD9488054A /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -283,6 +265,23 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; + C4DA18EDC3C1F9369084333D /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -358,7 +357,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -374,13 +373,14 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = 99Z3UD3LJM; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.mohemFlutterApp; + PRODUCT_BUNDLE_IDENTIFIER = com.cloudsolutions.mohemm; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; @@ -435,7 +435,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -484,7 +484,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -501,13 +501,14 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = 99Z3UD3LJM; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.mohemFlutterApp; + PRODUCT_BUNDLE_IDENTIFIER = com.cloudsolutions.mohemm; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -523,13 +524,14 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = 99Z3UD3LJM; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.mohemFlutterApp; + PRODUCT_BUNDLE_IDENTIFIER = com.cloudsolutions.mohemm; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; diff --git a/ios/Runner/GoogleService-Info.plist b/ios/Runner/GoogleService-Info.plist new file mode 100644 index 0000000..89817c1 --- /dev/null +++ b/ios/Runner/GoogleService-Info.plist @@ -0,0 +1,36 @@ + + + + + CLIENT_ID + 679409052782-3teqf8vdh9e1suvnhddj3pgmna7vg5rt.apps.googleusercontent.com + REVERSED_CLIENT_ID + com.googleusercontent.apps.679409052782-3teqf8vdh9e1suvnhddj3pgmna7vg5rt + API_KEY + AIzaSyCjMjhbeS7qilBoP4SH0t3SgkkHryf34JA + GCM_SENDER_ID + 679409052782 + PLIST_VERSION + 1 + BUNDLE_ID + com.cloudsolutions.mohemm + PROJECT_ID + mohemm-dce93 + STORAGE_BUCKET + mohemm-dce93.appspot.com + IS_ADS_ENABLED + + IS_ANALYTICS_ENABLED + + IS_APPINVITE_ENABLED + + IS_GCM_ENABLED + + IS_SIGNIN_ENABLED + + GOOGLE_APP_ID + 1:679409052782:ios:ace07cf8ba043b48a78a7f + DATABASE_URL + https://mohemm-dce93.firebaseio.com + + \ No newline at end of file diff --git a/lib/ui/landing/survey_screen.dart b/lib/ui/landing/survey_screen.dart index 16e6cec..a23733a 100644 --- a/lib/ui/landing/survey_screen.dart +++ b/lib/ui/landing/survey_screen.dart @@ -1,5 +1,6 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_rating_bar/flutter_rating_bar.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:mohem_flutter_app/classes/colors.dart'; import 'package:mohem_flutter_app/config/routes.dart'; @@ -8,7 +9,6 @@ import 'package:mohem_flutter_app/extensions/string_extensions.dart'; import 'package:mohem_flutter_app/extensions/widget_extensions.dart'; import 'package:mohem_flutter_app/generated/locale_keys.g.dart'; import 'package:mohem_flutter_app/widgets/button/default_button.dart'; -import 'package:flutter_rating_bar/flutter_rating_bar.dart'; import 'package:mohem_flutter_app/widgets/dynamic_forms/dynamic_textfield_widget.dart'; class SurveyScreen extends StatefulWidget { @@ -90,7 +90,7 @@ class _SurveyScreenState extends State { } Widget optionUI(String icon, int index) { - return (_selectedIndex == index + return (_selectedIndex == index ? SvgPicture.asset( 'assets/images/' + icon, height: 32, diff --git a/lib/ui/login/verify_last_login_screen.dart b/lib/ui/login/verify_last_login_screen.dart index 7229b53..b03c8aa 100644 --- a/lib/ui/login/verify_last_login_screen.dart +++ b/lib/ui/login/verify_last_login_screen.dart @@ -128,8 +128,8 @@ class _VerifyLastLoginScreenState extends State { shrinkWrap: true, children: [ if (!isNeedVerifyWithFaceIDAndBiometrics) getButton(3), - if (!isNeedVerifyWithFaceIDAndBiometrics) getButton(2), - getButton(4), + if (!isNeedVerifyWithFaceIDAndBiometrics) getButton(4), + getButton(2), getButton(1), ], ) @@ -195,13 +195,13 @@ class _VerifyLastLoginScreenState extends State { String getVerificationType(int type) { if (type == 1) { - LocaleKeys.sms.tr(); + return LocaleKeys.sms.tr(); } else if (type == 2) { - return LocaleKeys.fingerPrint.tr(); + return LocaleKeys.whatsapp.tr(); } else if (type == 3) { return LocaleKeys.face.tr(); } else if (type == 4) { - return LocaleKeys.whatsapp.tr(); + return LocaleKeys.fingerPrint.tr(); } return ""; } @@ -221,7 +221,7 @@ class _VerifyLastLoginScreenState extends State { } Widget _loginOptionButton(String _title, String _icon, int _flag, int? _loginIndex) { - bool isDisable = ((_flag == 3 && !checkBiometricIsAvailable(BiometricType.face)) || (_flag == 2 && !checkBiometricIsAvailable(BiometricType.fingerprint))); + bool isDisable = ((_flag == 3 && !checkBiometricIsAvailable(BiometricType.face)) || (_flag == 4 && !checkBiometricIsAvailable(BiometricType.fingerprint))); print("$_title:$isDisable"); return InkWell( onTap: isDisable @@ -232,19 +232,19 @@ class _VerifyLastLoginScreenState extends State { // isMoreOption = true; }); } else { - if (_flag == 2 || _flag == 3) { + if (_flag == 3 || _flag == 4) { bool authenticateWithFaceAndTouchID = await loginWithFaceIDAndBiometrics(); if (!authenticateWithFaceAndTouchID) { return; } else { - if (mobileLoginInfoListModel!.loginType == 2 || mobileLoginInfoListModel!.loginType == 3) { + if (mobileLoginInfoListModel!.loginType == 3 || mobileLoginInfoListModel!.loginType == 4) { // bool authenticateWithFaceAndTouchID = await loginWithFaceIDAndBiometrics(); // if (!authenticateWithFaceAndTouchID) { // return; // } else { // performApiCall(_title, _icon, _flag, isDirectLogin: true); // } - performApiCall(_title, _icon, _flag, isDirectLogin: true); + performApiCall(_title, _icon, _flag, _flag, isDirectLogin: true); } else { isNeedVerifyWithFaceIDAndBiometrics = true; selectedFlag = _flag; @@ -255,9 +255,9 @@ class _VerifyLastLoginScreenState extends State { } } else { if (isNeedVerifyWithFaceIDAndBiometrics) - performApiCall(_title, _icon, selectedFlag); + performApiCall(_title, _icon, selectedFlag, _flag); else - performApiCall(_title, _icon, _flag); + performApiCall(_title, _icon, _flag, _flag); } } }, @@ -290,11 +290,11 @@ class _VerifyLastLoginScreenState extends State { case 1: return _loginOptionButton(LocaleKeys.verifyThroughSMS.tr(), 'assets/images/login/verify_sms.svg', flag, null); case 2: - return _loginOptionButton(LocaleKeys.verifyThroughFingerprint.tr(), 'assets/images/login/verify_thumb.svg', flag, BiometricType.fingerprint.index); + return _loginOptionButton(LocaleKeys.verifyThroughWhatsapp.tr(), 'assets/images/login/verify_whatsapp.svg', flag, null); case 3: return _loginOptionButton(LocaleKeys.verifyThroughFace.tr(), 'assets/images/login/verify_face.svg', flag, BiometricType.face.index); case 4: - return _loginOptionButton(LocaleKeys.verifyThroughWhatsapp.tr(), 'assets/images/login/verify_whatsapp.svg', flag, null); + return _loginOptionButton(LocaleKeys.verifyThroughFingerprint.tr(), 'assets/images/login/verify_thumb.svg', flag, BiometricType.fingerprint.index); default: return const SizedBox(); } @@ -311,7 +311,7 @@ class _VerifyLastLoginScreenState extends State { return isAvailable; } - Future performApiCall(String _title, String _icon, int _flag, {bool isDirectLogin = false}) async { + Future performApiCall(String _title, String _icon, int _flag, int sendVerificationFlat, {bool isDirectLogin = false}) async { try { if (isDirectLogin) setState(() { @@ -322,14 +322,14 @@ class _VerifyLastLoginScreenState extends State { await LoginApiClient().checkMobileAppVersion(); await LoginApiClient().memberLogin(AppState().getUserName!, AppState().password!); if (!isDirectLogin) - BasicMemberInformationModel? memberInformationModel = await LoginApiClient() - .mohemmSendActivationCodeByOTPNotificationType(checkBiometricIsAvailable(BiometricType.fingerprint) ? 1 : 0, AppState().memberLoginList?.pMOBILENUMBER, _flag, AppState().getUserName); + BasicMemberInformationModel? memberInformationModel = + await LoginApiClient().mohemmSendActivationCodeByOTPNotificationType(0, AppState().memberLoginList?.pMOBILENUMBER, sendVerificationFlat, AppState().getUserName); if (isDirectLogin) performDirectApiCall(_title, _icon, _flag, ""); if (!isDirectLogin) Utils.hideLoading(context); if (!isDirectLogin) OtpDialog( context, - _flag, + sendVerificationFlat, int.tryParse(AppState().memberLoginList?.pMOBILENUMBER ?? ""), (value) async { Utils.showLoading(context); diff --git a/lib/ui/login/verify_login_screen.dart b/lib/ui/login/verify_login_screen.dart index b3d3204..5ebaf27 100644 --- a/lib/ui/login/verify_login_screen.dart +++ b/lib/ui/login/verify_login_screen.dart @@ -21,10 +21,10 @@ import 'package:mohem_flutter_app/models/generic_response_model.dart'; import 'package:mohem_flutter_app/models/member_information_list_model.dart'; import 'package:mohem_flutter_app/models/privilege_list_model.dart'; -// WhatsApp 4 +// WhatsApp 2 // SMS 1 // Face ID 3 -// Finger Print 2 +// Finger Print 4 class VerifyLoginScreen extends StatefulWidget { VerifyLoginScreen({Key? key}) : super(key: key); @@ -527,7 +527,7 @@ class _VerifyLoginScreenState extends State { } Widget _loginOptionButton(String _title, String _icon, int _flag, int? _loginIndex) { - bool isDisable = ((_flag == 3 && !checkBiometricIsAvailable(BiometricType.face)) || (_flag == 2 && !checkBiometricIsAvailable(BiometricType.fingerprint))); + bool isDisable = ((_flag == 3 && !checkBiometricIsAvailable(BiometricType.face)) || (_flag == 4 && !checkBiometricIsAvailable(BiometricType.fingerprint))); return InkWell( onTap: isDisable ? null @@ -550,9 +550,9 @@ class _VerifyLoginScreenState extends State { } } else { if (isNeedVerifyWithFaceIDAndBiometrics) - performApiCall(_title, _icon, selectedFlag); + performApiCall(_title, _icon, selectedFlag,_flag); else - performApiCall(_title, _icon, _flag); + performApiCall(_title, _icon, _flag,_flag); } } }, @@ -606,17 +606,17 @@ class _VerifyLoginScreenState extends State { return isAvailable; } - Future performApiCall(String _title, String _icon, int _flag) async { + Future performApiCall(String _title, String _icon, int _flag,int sendVerificationFlat) async { try { Utils.showLoading(context); await LoginApiClient().checkMobileAppVersion(); await LoginApiClient().memberLogin(AppState().getUserName!, AppState().password!); BasicMemberInformationModel? memberInformationModel = await LoginApiClient() - .mohemmSendActivationCodeByOTPNotificationType(0, AppState().memberLoginList?.pMOBILENUMBER, _flag, AppState().getUserName); + .mohemmSendActivationCodeByOTPNotificationType(0, AppState().memberLoginList?.pMOBILENUMBER, sendVerificationFlat, AppState().getUserName); Utils.hideLoading(context); OtpDialog( context, - _flag, + sendVerificationFlat, int.tryParse(AppState().memberLoginList?.pMOBILENUMBER ?? ""), (value) async { Utils.showLoading(context);