Merge branch 'development_mirza' into 'master'

Development mirza

See merge request mirza.shafique/mohem_flutter_app!87
merge-requests/1/merge
Mirza Shafique 3 years ago
commit 64f2ba5a0b

@ -3,7 +3,7 @@
archiveVersion = 1; archiveVersion = 1;
classes = { classes = {
}; };
objectVersion = 50; objectVersion = 51;
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
@ -76,7 +76,6 @@
3B4D9CAD3B112CCF7FEE1F91 /* Pods-Runner.release.xcconfig */, 3B4D9CAD3B112CCF7FEE1F91 /* Pods-Runner.release.xcconfig */,
3A5ABA8306DCFDB9E71D453A /* Pods-Runner.profile.xcconfig */, 3A5ABA8306DCFDB9E71D453A /* Pods-Runner.profile.xcconfig */,
); );
name = Pods;
path = Pods; path = Pods;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
@ -140,7 +139,7 @@
9705A1C41CF9048500538489 /* Embed Frameworks */, 9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
AAF25E5FC427CABFCDCC628C /* [CP] Embed Pods Frameworks */, AAF25E5FC427CABFCDCC628C /* [CP] Embed Pods Frameworks */,
8E1FBB2EA6B3AEDD9488054A /* [CP] Copy Pods Resources */, C4DA18EDC3C1F9369084333D /* [CP] Copy Pods Resources */,
); );
buildRules = ( 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"; 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; 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 */ = { 9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
@ -283,6 +265,23 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0; 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 */ /* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */
@ -358,7 +357,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0; IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos; SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos; SUPPORTED_PLATFORMS = iphoneos;
@ -374,13 +373,14 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 99Z3UD3LJM;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
PRODUCT_BUNDLE_IDENTIFIER = com.mohemFlutterApp; PRODUCT_BUNDLE_IDENTIFIER = com.cloudsolutions.mohemm;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0; SWIFT_VERSION = 5.0;
@ -435,7 +435,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0; IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES; MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos; SDKROOT = iphoneos;
@ -484,7 +484,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0; IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos; SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos; SUPPORTED_PLATFORMS = iphoneos;
@ -501,13 +501,14 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 99Z3UD3LJM;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
PRODUCT_BUNDLE_IDENTIFIER = com.mohemFlutterApp; PRODUCT_BUNDLE_IDENTIFIER = com.cloudsolutions.mohemm;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@ -523,13 +524,14 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 99Z3UD3LJM;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
PRODUCT_BUNDLE_IDENTIFIER = com.mohemFlutterApp; PRODUCT_BUNDLE_IDENTIFIER = com.cloudsolutions.mohemm;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0; SWIFT_VERSION = 5.0;

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CLIENT_ID</key>
<string>679409052782-3teqf8vdh9e1suvnhddj3pgmna7vg5rt.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.679409052782-3teqf8vdh9e1suvnhddj3pgmna7vg5rt</string>
<key>API_KEY</key>
<string>AIzaSyCjMjhbeS7qilBoP4SH0t3SgkkHryf34JA</string>
<key>GCM_SENDER_ID</key>
<string>679409052782</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>com.cloudsolutions.mohemm</string>
<key>PROJECT_ID</key>
<string>mohemm-dce93</string>
<key>STORAGE_BUCKET</key>
<string>mohemm-dce93.appspot.com</string>
<key>IS_ADS_ENABLED</key>
<false></false>
<key>IS_ANALYTICS_ENABLED</key>
<false></false>
<key>IS_APPINVITE_ENABLED</key>
<true></true>
<key>IS_GCM_ENABLED</key>
<true></true>
<key>IS_SIGNIN_ENABLED</key>
<true></true>
<key>GOOGLE_APP_ID</key>
<string>1:679409052782:ios:ace07cf8ba043b48a78a7f</string>
<key>DATABASE_URL</key>
<string>https://mohemm-dce93.firebaseio.com</string>
</dict>
</plist>

@ -1,5 +1,6 @@
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_rating_bar/flutter_rating_bar.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:mohem_flutter_app/classes/colors.dart'; import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/config/routes.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/extensions/widget_extensions.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart'; import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/widgets/button/default_button.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'; import 'package:mohem_flutter_app/widgets/dynamic_forms/dynamic_textfield_widget.dart';
class SurveyScreen extends StatefulWidget { class SurveyScreen extends StatefulWidget {
@ -90,7 +90,7 @@ class _SurveyScreenState extends State<SurveyScreen> {
} }
Widget optionUI(String icon, int index) { Widget optionUI(String icon, int index) {
return (_selectedIndex == index return (_selectedIndex == index
? SvgPicture.asset( ? SvgPicture.asset(
'assets/images/' + icon, 'assets/images/' + icon,
height: 32, height: 32,

@ -128,8 +128,8 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
shrinkWrap: true, shrinkWrap: true,
children: [ children: [
if (!isNeedVerifyWithFaceIDAndBiometrics) getButton(3), if (!isNeedVerifyWithFaceIDAndBiometrics) getButton(3),
if (!isNeedVerifyWithFaceIDAndBiometrics) getButton(2), if (!isNeedVerifyWithFaceIDAndBiometrics) getButton(4),
getButton(4), getButton(2),
getButton(1), getButton(1),
], ],
) )
@ -195,13 +195,13 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
String getVerificationType(int type) { String getVerificationType(int type) {
if (type == 1) { if (type == 1) {
LocaleKeys.sms.tr(); return LocaleKeys.sms.tr();
} else if (type == 2) { } else if (type == 2) {
return LocaleKeys.fingerPrint.tr(); return LocaleKeys.whatsapp.tr();
} else if (type == 3) { } else if (type == 3) {
return LocaleKeys.face.tr(); return LocaleKeys.face.tr();
} else if (type == 4) { } else if (type == 4) {
return LocaleKeys.whatsapp.tr(); return LocaleKeys.fingerPrint.tr();
} }
return ""; return "";
} }
@ -221,7 +221,7 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
} }
Widget _loginOptionButton(String _title, String _icon, int _flag, int? _loginIndex) { 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"); print("$_title:$isDisable");
return InkWell( return InkWell(
onTap: isDisable onTap: isDisable
@ -232,19 +232,19 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
// isMoreOption = true; // isMoreOption = true;
}); });
} else { } else {
if (_flag == 2 || _flag == 3) { if (_flag == 3 || _flag == 4) {
bool authenticateWithFaceAndTouchID = await loginWithFaceIDAndBiometrics(); bool authenticateWithFaceAndTouchID = await loginWithFaceIDAndBiometrics();
if (!authenticateWithFaceAndTouchID) { if (!authenticateWithFaceAndTouchID) {
return; return;
} else { } else {
if (mobileLoginInfoListModel!.loginType == 2 || mobileLoginInfoListModel!.loginType == 3) { if (mobileLoginInfoListModel!.loginType == 3 || mobileLoginInfoListModel!.loginType == 4) {
// bool authenticateWithFaceAndTouchID = await loginWithFaceIDAndBiometrics(); // bool authenticateWithFaceAndTouchID = await loginWithFaceIDAndBiometrics();
// if (!authenticateWithFaceAndTouchID) { // if (!authenticateWithFaceAndTouchID) {
// return; // return;
// } else { // } else {
// performApiCall(_title, _icon, _flag, isDirectLogin: true); // performApiCall(_title, _icon, _flag, isDirectLogin: true);
// } // }
performApiCall(_title, _icon, _flag, isDirectLogin: true); performApiCall(_title, _icon, _flag, _flag, isDirectLogin: true);
} else { } else {
isNeedVerifyWithFaceIDAndBiometrics = true; isNeedVerifyWithFaceIDAndBiometrics = true;
selectedFlag = _flag; selectedFlag = _flag;
@ -255,9 +255,9 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
} }
} else { } else {
if (isNeedVerifyWithFaceIDAndBiometrics) if (isNeedVerifyWithFaceIDAndBiometrics)
performApiCall(_title, _icon, selectedFlag); performApiCall(_title, _icon, selectedFlag, _flag);
else else
performApiCall(_title, _icon, _flag); performApiCall(_title, _icon, _flag, _flag);
} }
} }
}, },
@ -290,11 +290,11 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
case 1: case 1:
return _loginOptionButton(LocaleKeys.verifyThroughSMS.tr(), 'assets/images/login/verify_sms.svg', flag, null); return _loginOptionButton(LocaleKeys.verifyThroughSMS.tr(), 'assets/images/login/verify_sms.svg', flag, null);
case 2: 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: case 3:
return _loginOptionButton(LocaleKeys.verifyThroughFace.tr(), 'assets/images/login/verify_face.svg', flag, BiometricType.face.index); return _loginOptionButton(LocaleKeys.verifyThroughFace.tr(), 'assets/images/login/verify_face.svg', flag, BiometricType.face.index);
case 4: 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: default:
return const SizedBox(); return const SizedBox();
} }
@ -311,7 +311,7 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
return isAvailable; return isAvailable;
} }
Future<void> performApiCall(String _title, String _icon, int _flag, {bool isDirectLogin = false}) async { Future<void> performApiCall(String _title, String _icon, int _flag, int sendVerificationFlat, {bool isDirectLogin = false}) async {
try { try {
if (isDirectLogin) if (isDirectLogin)
setState(() { setState(() {
@ -322,14 +322,14 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
await LoginApiClient().checkMobileAppVersion(); await LoginApiClient().checkMobileAppVersion();
await LoginApiClient().memberLogin(AppState().getUserName!, AppState().password!); await LoginApiClient().memberLogin(AppState().getUserName!, AppState().password!);
if (!isDirectLogin) if (!isDirectLogin)
BasicMemberInformationModel? memberInformationModel = await LoginApiClient() BasicMemberInformationModel? memberInformationModel =
.mohemmSendActivationCodeByOTPNotificationType(checkBiometricIsAvailable(BiometricType.fingerprint) ? 1 : 0, AppState().memberLoginList?.pMOBILENUMBER, _flag, AppState().getUserName); await LoginApiClient().mohemmSendActivationCodeByOTPNotificationType(0, AppState().memberLoginList?.pMOBILENUMBER, sendVerificationFlat, AppState().getUserName);
if (isDirectLogin) performDirectApiCall(_title, _icon, _flag, ""); if (isDirectLogin) performDirectApiCall(_title, _icon, _flag, "");
if (!isDirectLogin) Utils.hideLoading(context); if (!isDirectLogin) Utils.hideLoading(context);
if (!isDirectLogin) if (!isDirectLogin)
OtpDialog( OtpDialog(
context, context,
_flag, sendVerificationFlat,
int.tryParse(AppState().memberLoginList?.pMOBILENUMBER ?? ""), int.tryParse(AppState().memberLoginList?.pMOBILENUMBER ?? ""),
(value) async { (value) async {
Utils.showLoading(context); Utils.showLoading(context);

@ -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/member_information_list_model.dart';
import 'package:mohem_flutter_app/models/privilege_list_model.dart'; import 'package:mohem_flutter_app/models/privilege_list_model.dart';
// WhatsApp 4 // WhatsApp 2
// SMS 1 // SMS 1
// Face ID 3 // Face ID 3
// Finger Print 2 // Finger Print 4
class VerifyLoginScreen extends StatefulWidget { class VerifyLoginScreen extends StatefulWidget {
VerifyLoginScreen({Key? key}) : super(key: key); VerifyLoginScreen({Key? key}) : super(key: key);
@ -527,7 +527,7 @@ class _VerifyLoginScreenState extends State<VerifyLoginScreen> {
} }
Widget _loginOptionButton(String _title, String _icon, int _flag, int? _loginIndex) { 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( return InkWell(
onTap: isDisable onTap: isDisable
? null ? null
@ -550,9 +550,9 @@ class _VerifyLoginScreenState extends State<VerifyLoginScreen> {
} }
} else { } else {
if (isNeedVerifyWithFaceIDAndBiometrics) if (isNeedVerifyWithFaceIDAndBiometrics)
performApiCall(_title, _icon, selectedFlag); performApiCall(_title, _icon, selectedFlag,_flag);
else else
performApiCall(_title, _icon, _flag); performApiCall(_title, _icon, _flag,_flag);
} }
} }
}, },
@ -606,17 +606,17 @@ class _VerifyLoginScreenState extends State<VerifyLoginScreen> {
return isAvailable; return isAvailable;
} }
Future<void> performApiCall(String _title, String _icon, int _flag) async { Future<void> performApiCall(String _title, String _icon, int _flag,int sendVerificationFlat) async {
try { try {
Utils.showLoading(context); Utils.showLoading(context);
await LoginApiClient().checkMobileAppVersion(); await LoginApiClient().checkMobileAppVersion();
await LoginApiClient().memberLogin(AppState().getUserName!, AppState().password!); await LoginApiClient().memberLogin(AppState().getUserName!, AppState().password!);
BasicMemberInformationModel? memberInformationModel = await LoginApiClient() BasicMemberInformationModel? memberInformationModel = await LoginApiClient()
.mohemmSendActivationCodeByOTPNotificationType(0, AppState().memberLoginList?.pMOBILENUMBER, _flag, AppState().getUserName); .mohemmSendActivationCodeByOTPNotificationType(0, AppState().memberLoginList?.pMOBILENUMBER, sendVerificationFlat, AppState().getUserName);
Utils.hideLoading(context); Utils.hideLoading(context);
OtpDialog( OtpDialog(
context, context,
_flag, sendVerificationFlat,
int.tryParse(AppState().memberLoginList?.pMOBILENUMBER ?? ""), int.tryParse(AppState().memberLoginList?.pMOBILENUMBER ?? ""),
(value) async { (value) async {
Utils.showLoading(context); Utils.showLoading(context);

Loading…
Cancel
Save