diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart index 74fa8e60..e773957a 100644 --- a/lib/pages/login/confirm-login.dart +++ b/lib/pages/login/confirm-login.dart @@ -47,7 +47,12 @@ class ConfirmLogin extends StatefulWidget { final fromRegistration; final bool isDubai; - const ConfirmLogin({Key? key, this.changePageViewIndex, this.fromRegistration = false, this.isDubai = false}) : super(key: key); + const ConfirmLogin( + {Key? key, + this.changePageViewIndex, + this.fromRegistration = false, + this.isDubai = false}) + : super(key: key); @override _ConfirmLogin createState() => _ConfirmLogin(); @@ -59,7 +64,8 @@ class _ConfirmLogin extends State { var sharedPref = AppSharedPreferences(); bool authenticated = false; final authService = AuthProvider(); - PharmacyModuleViewModel pharmacyModuleViewModel = locator(); + PharmacyModuleViewModel pharmacyModuleViewModel = + locator(); late int mobileNumber; String errorMsg = ''; SelectDeviceIMEIRES? user; @@ -89,8 +95,10 @@ class _ConfirmLogin extends State { int fingrePrintBefore = 0; - AuthenticatedUserObject authenticatedUserObject = locator(); - AppointmentRateViewModel appointmentRateViewModel = locator(); + AuthenticatedUserObject authenticatedUserObject = + locator(); + AppointmentRateViewModel appointmentRateViewModel = + locator(); late ProjectViewModel projectViewModel; late ToDoCountProviderModel toDoProvider; @@ -138,16 +146,30 @@ class _ConfirmLogin extends State { children: [ Text( TranslationBase.of(context).welcomeBack, - style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64), + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64), ), Text( user!.name!.toLowerCase().capitalizeFirstofEach, - style: TextStyle(fontSize: 24, fontWeight: FontWeight.w700, color: Color(0xff2B353E), height: 1, letterSpacing: -1.44), + style: TextStyle( + fontSize: 24, + fontWeight: FontWeight.w700, + color: Color(0xff2B353E), + height: 1, + letterSpacing: -1.44), ), SizedBox(height: 10), Text( TranslationBase.of(context).accountInfo, - style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 25 / 16), + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + height: 25 / 16), ), Container( height: 72, @@ -166,29 +188,46 @@ class _ConfirmLogin extends State { mainAxisSize: MainAxisSize.min, children: [ Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.center, children: [ Text( - TranslationBase.of(context).lastLoginAt.toCamelCase, - style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64), + TranslationBase.of(context) + .lastLoginAt + .toCamelCase, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64), ), Text( - user!.editedOn != null - ? DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(user!.editedOn!)) - : user!.createdOn != null - ? DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(user!.createdOn!)) - : '--', - style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48), + // user!.editedOn != null + // ? DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(user!.editedOn!)) + // : + user!.createdOn != null + ? DateUtil.getDayMonthYearDateFormatted( + DateUtil.convertStringToDate( + user!.createdOn!)) + : '--', + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.48), ), ], ), Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.center, children: [ Text( - TranslationBase.of(context).lastLoginWith.toCamelCase, + TranslationBase.of(context) + .lastLoginWith + .toCamelCase, style: TextStyle( fontSize: 10, fontWeight: FontWeight.w600, @@ -205,12 +244,23 @@ class _ConfirmLogin extends State { ), Expanded(child: SizedBox()), Text( - user!.editedOn != null - ? DateUtil.formatDateToTimeLang(DateUtil.convertStringToDate(user!.editedOn!), false) - : user!.createdOn != null - ? DateUtil.formatDateToTimeLang(DateUtil.convertStringToDate(user!.createdOn!), false) - : '--', - style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.48), + // user!.editedOn != null + // ? DateUtil.formatDateToTimeLang( + // DateUtil.convertStringToDate( + // user!.editedOn!), + // false) + // : + user!.createdOn != null + ? DateUtil.formatDateToTimeLang( + DateUtil.convertStringToDate( + user!.createdOn!), + false) + : '--', + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + color: Color(0xff575757), + letterSpacing: -0.48), ), ], ) @@ -219,10 +269,18 @@ class _ConfirmLogin extends State { ), Text( TranslationBase.of(context).pleaseVerify, - style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64), + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + letterSpacing: -0.64), ), GridView( - gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, crossAxisSpacing: 13, mainAxisSpacing: 9), + gridDelegate: + SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 2, + crossAxisSpacing: 13, + mainAxisSpacing: 9), physics: NeverScrollableScrollPhysics(), padding: EdgeInsets.only(top: 9), shrinkWrap: true, @@ -236,40 +294,62 @@ class _ConfirmLogin extends State { ], ) else - Column(mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ - Image.asset( - 'assets/images/habib-logo.png', - height: 90, - width: 90, - ), - SizedBox(height: 23), - this.onlySMSBox == false - ? Text( - TranslationBase.of(context).verifyLoginWith, - style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 25 / 16), - ) - : Text( - TranslationBase.of(context).verifyFingerprint2, - style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 25 / 16), - ), - SizedBox(height: 23), - Text( - TranslationBase.of(context).pleaseVerify, - style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64), - ), - GridView( - gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, crossAxisSpacing: 13, mainAxisSpacing: 9), - physics: NeverScrollableScrollPhysics(), - padding: EdgeInsets.only(top: 9), - shrinkWrap: true, - children: [ - if (onlySMSBox == false) getButton(3), - if (onlySMSBox == false) getButton(2), - getButton(1), - getButton(4), - ], - ), - ]), + Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Image.asset( + 'assets/images/habib-logo.png', + height: 90, + width: 90, + ), + SizedBox(height: 23), + this.onlySMSBox == false + ? Text( + TranslationBase.of(context).verifyLoginWith, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + height: 25 / 16), + ) + : Text( + TranslationBase.of(context) + .verifyFingerprint2, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + height: 25 / 16), + ), + SizedBox(height: 23), + Text( + TranslationBase.of(context).pleaseVerify, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + letterSpacing: -0.64), + ), + GridView( + gridDelegate: + SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 2, + crossAxisSpacing: 13, + mainAxisSpacing: 9), + physics: NeverScrollableScrollPhysics(), + padding: EdgeInsets.only(top: 9), + shrinkWrap: true, + children: [ + if (onlySMSBox == false) getButton(3), + if (onlySMSBox == false) getButton(2), + getButton(1), + getButton(4), + ], + ), + ]), ], ), ), @@ -280,7 +360,8 @@ class _ConfirmLogin extends State { TranslationBase.of(context).useAnotherAccount, () { Navigator.of(context).pushNamed(LOGIN_TYPE); - projectViewModel.analytics.loginRegistration.login_with_other_account(); + projectViewModel.analytics.loginRegistration + .login_with_other_account(); }, ), ], @@ -290,7 +371,6 @@ class _ConfirmLogin extends State { } Future _getAvailableBiometrics() async { - final bool canAuthenticateWithBiometrics = await auth.canCheckBiometrics; final bool canAuthenticate = canAuthenticateWithBiometrics || await auth.isDeviceSupported(); @@ -322,7 +402,8 @@ class _ConfirmLogin extends State { login_method = type; LoginRegistration.verificationMethod = type; // if(!widget.fromRegistration) - projectViewModel.analytics.loginRegistration.login_verfication(forRegistration: widget.fromRegistration); + projectViewModel.analytics.loginRegistration + .login_verfication(forRegistration: widget.fromRegistration); switch (type) { case 1: @@ -340,7 +421,8 @@ class _ConfirmLogin extends State { default: break; } - sharedPref.setInt(LAST_LOGIN, this.selectedOption); //this.cs.sharedService.setStorage(this.selectedOption, AuthenticationService.LAST_LOGIN); + sharedPref.setInt(LAST_LOGIN, + this.selectedOption); //this.cs.sharedService.setStorage(this.selectedOption, AuthenticationService.LAST_LOGIN); } loginWithSMS(type) { @@ -396,7 +478,8 @@ class _ConfirmLogin extends State { GifLoaderDialogUtils.showMyDialog(context); if (healthId != null || widget.isDubai) { if (!widget.isDubai) { - request.dob = dob; //isHijri == 1 ? dob : dateFormat2.format(dateFormat.parse(dob)); + request.dob = + dob; //isHijri == 1 ? dob : dateFormat2.format(dateFormat.parse(dob)); } request.healthId = healthId; request.isHijri = isHijri; @@ -452,7 +535,11 @@ class _ConfirmLogin extends State { stickyAuth: true, ), authMessages: [ - IOSAuthMessages(cancelButton: 'cancel', goToSettingsButton: 'settings', goToSettingsDescription: 'Please set up your Touch ID.', lockOut: 'Please reenable your Touch ID'), + IOSAuthMessages( + cancelButton: 'cancel', + goToSettingsButton: 'settings', + goToSettingsDescription: 'Please set up your Touch ID.', + lockOut: 'Please reenable your Touch ID'), ], ); } on PlatformException catch (e) { @@ -508,14 +595,19 @@ class _ConfirmLogin extends State { setDefault() async { showLoader(true); - if (await sharedPref.getObject(IMEI_USER_DATA) != null) user = SelectDeviceIMEIRES.fromJson(await sharedPref.getObject(IMEI_USER_DATA)); + if (await sharedPref.getObject(IMEI_USER_DATA) != null) + user = SelectDeviceIMEIRES.fromJson( + await sharedPref.getObject(IMEI_USER_DATA)); if (await sharedPref.getObject(REGISTER_DATA_FOR_LOGIIN) != null) { isMoreOption = true; - this.registerd_data = await CheckPatientAuthenticationReq.fromJson(await sharedPref.getObject(REGISTER_DATA_FOR_LOGIIN)); + this.registerd_data = await CheckPatientAuthenticationReq.fromJson( + await sharedPref.getObject(REGISTER_DATA_FOR_LOGIIN)); } - this.mobileNumber = this.registerd_data != null ? this.registerd_data.patientMobileNumber : int.parse(this.user!.mobile!); + this.mobileNumber = this.registerd_data != null + ? this.registerd_data.patientMobileNumber + : int.parse(this.user!.mobile!); this.zipCode = this.registerd_data != null ? this.registerd_data.zipCode : this.user!.outSA == true @@ -534,7 +626,9 @@ class _ConfirmLogin extends State { if (nhic != null) { final DateFormat dateFormat = DateFormat('MM/dd/yyyy'); final DateFormat dateFormat2 = DateFormat('dd/MM/yyyy'); - dob = nhic['IsHijri'] ? nhic['DateOfBirth'] : dateFormat2.format(dateFormat.parse(nhic['DateOfBirth'])); + dob = nhic['IsHijri'] + ? nhic['DateOfBirth'] + : dateFormat2.format(dateFormat.parse(nhic['DateOfBirth'])); isHijri = nhic['IsHijri'] ? 1 : 0; healthId = nhic['HealthId']; @@ -557,22 +651,34 @@ class _ConfirmLogin extends State { request.deviceToken = this.deviceToken; request.projectOutSA = this.patientOutSA == true ? true : false; request.loginType = this.selectedOption; - request.oTPSendType = type == 1 ? type : 2; //this.selectedOption == 1 ? 1 : 2; + request.oTPSendType = + type == 1 ? type : 2; //this.selectedOption == 1 ? 1 : 2; request.zipCode = this.zipCode; request.logInTokenID = this.loginTokenID ?? ""; if (this.registerd_data != null) { - request.searchType = this.registerd_data.searchType != null ? this.registerd_data.searchType : 1; - request.patientID = this.registerd_data.patientID != null ? this.registerd_data.patientID : 0; - request.patientIdentificationID = request.nationalID = this.registerd_data.patientIdentificationID != null ? this.registerd_data.patientIdentificationID : '0'; + request.searchType = this.registerd_data.searchType != null + ? this.registerd_data.searchType + : 1; + request.patientID = this.registerd_data.patientID != null + ? this.registerd_data.patientID + : 0; + request.patientIdentificationID = request.nationalID = + this.registerd_data.patientIdentificationID != null + ? this.registerd_data.patientIdentificationID + : '0'; request.dob = this.registerd_data.dob; request.isRegister = this.registerd_data.isRegister; } else { request.searchType = request.searchType != null ? request.searchType : 2; - request.patientID = this.user!.patientID != null ? this.user!.patientID : 0; - request.nationalID = request.nationalID != null ? request.nationalID : '0'; - request.patientIdentificationID = request.patientIdentificationID != null ? request.patientIdentificationID : '0'; + request.patientID = + this.user!.patientID != null ? this.user!.patientID : 0; + request.nationalID = + request.nationalID != null ? request.nationalID : '0'; + request.patientIdentificationID = request.patientIdentificationID != null + ? request.patientIdentificationID + : '0'; request.isRegister = false; } request.deviceTypeID = request.searchType; @@ -597,14 +703,19 @@ class _ConfirmLogin extends State { res = result, if (result is Map) { - result = CheckActivationCode.fromJson(result as Map), - if (this.registerd_data != null && this.registerd_data.isRegister == true) + result = CheckActivationCode.fromJson( + result as Map), + if (this.registerd_data != null && + this.registerd_data.isRegister == true) { // if(widget.isDubai ==false){ widget.changePageViewIndex!(1), // if(widget.isDubai ==false){ - Navigator.popUntil(context, (route) => Utils.route(route, equalsTo: RegisterNew)), + Navigator.popUntil( + context, + (route) => + Utils.route(route, equalsTo: RegisterNew)), } } else @@ -614,8 +725,11 @@ class _ConfirmLogin extends State { Future.delayed(Duration(seconds: 1), () { AppToast.showErrorToast(message: result); }), - projectViewModel.analytics.loginRegistration.login_fail(error: result), - projectViewModel.analytics.errorTracking.log('otp_verification_at_confirm_login', error: result), + projectViewModel.analytics.loginRegistration + .login_fail(error: result), + projectViewModel.analytics.errorTracking.log( + 'otp_verification_at_confirm_login', + error: result), } }) .catchError((err) { @@ -633,27 +747,36 @@ class _ConfirmLogin extends State { res = result, if (result is Map) { - result = CheckActivationCode.fromJson(result as Map), - if (this.registerd_data != null && this.registerd_data.isRegister == true) + result = CheckActivationCode.fromJson( + result as Map), + if (this.registerd_data != null && + this.registerd_data.isRegister == true) { widget.changePageViewIndex!(1), - Navigator.popUntil(context, (route) => Utils.route(route, equalsTo: RegisterNew)), + Navigator.popUntil( + context, + (route) => + Utils.route(route, equalsTo: RegisterNew)), } else { sharedPref.remove(FAMILY_FILE), result.list.isFamily = false, userData = result.list, - sharedPref.setString(BLOOD_TYPE, result.patientBloodType ?? "O+"), + sharedPref.setString( + BLOOD_TYPE, result.patientBloodType ?? "O+"), //Remove o+ from here Added by Aamir authenticatedUserObject.user = result.list, projectViewModel.setPrivilege(privilegeList: res), sharedPref.setObject(MAIN_USER, result.list), sharedPref.setObject(USER_PROFILE, result.list), loginTokenID = result.logInTokenID, - sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID), - sharedPref.setString(TOKEN, result.authenticationTokenID), - projectViewModel.analytics.loginRegistration.login_successful(), + sharedPref.setObject( + LOGIN_TOKEN_ID, result.logInTokenID), + sharedPref.setString( + TOKEN, result.authenticationTokenID), + projectViewModel.analytics.loginRegistration + .login_successful(), checkIfUserAgreedBefore(result), } } @@ -666,8 +789,10 @@ class _ConfirmLogin extends State { startSMSService(tempType); }), - projectViewModel.analytics.loginRegistration.login_fail(error: result), - projectViewModel.analytics.errorTracking.log('otp_verification_at_confirm_login', error: result) + projectViewModel.analytics.loginRegistration + .login_fail(error: result), + projectViewModel.analytics.errorTracking + .log('otp_verification_at_confirm_login', error: result) } }) .catchError((err) { @@ -703,17 +828,25 @@ class _ConfirmLogin extends State { print("Has Admission Request: $hasAdmissionRequest"); if (isAdmitted) { if (res['PatientAdmittedInformation'].length != 0) { - getAdmissionInfoResponseModel = GetAdmissionInfoResponseModel.fromJson(res['PatientAdmittedInformation'][0]); - projectViewModel.setInPatientProjectID(res['PatientAdmittedInformation'][0]['ProjectID']); - projectViewModel.setInPatientAdmissionInfo(getAdmissionInfoResponseModel); + getAdmissionInfoResponseModel = + GetAdmissionInfoResponseModel.fromJson( + res['PatientAdmittedInformation'][0]); + projectViewModel.setInPatientProjectID( + res['PatientAdmittedInformation'][0]['ProjectID']); + projectViewModel + .setInPatientAdmissionInfo(getAdmissionInfoResponseModel); projectViewModel.setIsPatientAdmitted(true); } } if (hasAdmissionRequest) { if (res['MedicalInstruction'].length != 0) { - getAdmissionRequestInfoResponseModel = GetAdmissionRequestInfoResponseModel.fromJson(res['MedicalInstruction'][0]); - projectViewModel.setInPatientProjectID(res['MedicalInstruction'][0]['ProjectID']); - projectViewModel.setInPatientAdmissionRequest(getAdmissionRequestInfoResponseModel); + getAdmissionRequestInfoResponseModel = + GetAdmissionRequestInfoResponseModel.fromJson( + res['MedicalInstruction'][0]); + projectViewModel.setInPatientProjectID( + res['MedicalInstruction'][0]['ProjectID']); + projectViewModel.setInPatientAdmissionRequest( + getAdmissionRequestInfoResponseModel); projectViewModel.setPatientHasAdmissionRequest(true); } } @@ -722,7 +855,10 @@ class _ConfirmLogin extends State { } insertIMEI() { - authService.insertDeviceImei(selectedOption).then((value) => {}).catchError((err) { + authService + .insertDeviceImei(selectedOption) + .then((value) => {}) + .catchError((err) { print(err); }); } @@ -732,7 +868,8 @@ class _ConfirmLogin extends State { ClinicListService service = new ClinicListService(); service.getActiveAppointmentNo(context).then((res) { if (res['MessageStatus'] == 1) { - toDoProvider.setState(res['AppointmentActiveNumber'], res['AncillaryOrderListCount'], true, "0"); + toDoProvider.setState(res['AppointmentActiveNumber'], + res['AncillaryOrderListCount'], true, "0"); // toDoProvider.setState(res['AppointmentActiveNumber'], true, "0"); } else {} }).catchError((err) { @@ -794,8 +931,14 @@ class _ConfirmLogin extends State { }); } - Widget _loginOptionButton(String _title, String _icon, int _flag, int? _loginIndex) { - bool isDisable = (_flag == 3 && !checkIfBiometricAvailable(BiometricType.face) || _flag == 2 && !checkIfBiometricAvailable(BiometricType.fingerprint) && _flag == 2 && !checkIfBiometricAvailable(BiometricType.strong)); + Widget _loginOptionButton( + String _title, String _icon, int _flag, int? _loginIndex) { + bool isDisable = + (_flag == 3 && !checkIfBiometricAvailable(BiometricType.face) || + _flag == 2 && + !checkIfBiometricAvailable(BiometricType.fingerprint) && + _flag == 2 && + !checkIfBiometricAvailable(BiometricType.strong)); return InkWell( onTap: isDisable ? null @@ -806,7 +949,8 @@ class _ConfirmLogin extends State { }); } else { authenticateUser(_flag, isActive: _loginIndex); - projectViewModel.analytics.loginRegistration.verify_otp_method(forRegistration: widget.fromRegistration); + projectViewModel.analytics.loginRegistration.verify_otp_method( + forRegistration: widget.fromRegistration); } }, child: Container( @@ -831,7 +975,14 @@ class _ConfirmLogin extends State { ), Text( TranslationBase.of(context).verifyThrough + " " + _title, - style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: isDisable ? Color(0xff2B353E).withOpacity(0.7) : Color(0xff2B353E), letterSpacing: -0.48, height: 20 / 16), + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + color: isDisable + ? Color(0xff2B353E).withOpacity(0.7) + : Color(0xff2B353E), + letterSpacing: -0.48, + height: 20 / 16), ), ], ), @@ -843,16 +994,26 @@ class _ConfirmLogin extends State { Widget getButton(int flag) { switch (flag) { case 4: - return _loginOptionButton(TranslationBase.of(context).verifyWhatsApp, 'assets/images/new/verify_whatsapp.svg', flag, null); + return _loginOptionButton(TranslationBase.of(context).verifyWhatsApp, + 'assets/images/new/verify_whatsapp.svg', flag, null); break; case 1: - return _loginOptionButton(TranslationBase.of(context).verifySMS, 'assets/images/new/verify_sms.svg', flag, null); + return _loginOptionButton(TranslationBase.of(context).verifySMS, + 'assets/images/new/verify_sms.svg', flag, null); break; case 2: - return _loginOptionButton(TranslationBase.of(context).verifyFingerprint, 'assets/images/new/verify_thumb.svg', flag, BiometricType.fingerprint.index); + return _loginOptionButton( + TranslationBase.of(context).verifyFingerprint, + 'assets/images/new/verify_thumb.svg', + flag, + BiometricType.fingerprint.index); break; case 3: - return _loginOptionButton(TranslationBase.of(context).verifyFaceID, 'assets/images/new/verify_face.svg', flag, BiometricType.face.index); + return _loginOptionButton( + TranslationBase.of(context).verifyFaceID, + 'assets/images/new/verify_face.svg', + flag, + BiometricType.face.index); break; default: @@ -864,7 +1025,9 @@ class _ConfirmLogin extends State { }, child: RoundedContainer( height: 150, - backgroundColor: BiometricType.fingerprint.index == 1 ? Colors.white : Colors.white.withOpacity(.7), + backgroundColor: BiometricType.fingerprint.index == 1 + ? Colors.white + : Colors.white.withOpacity(.7), borderColor: Colors.grey, showBorder: true, child: Padding( @@ -883,7 +1046,10 @@ class _ConfirmLogin extends State { : SizedBox( height: 20, ), - Texts(TranslationBase.of(context).moreVerification, fontSize: SizeConfig.textMultiplier! * 1.8, textAlign: TextAlign.center, color: Colors.black) + Texts(TranslationBase.of(context).moreVerification, + fontSize: SizeConfig.textMultiplier! * 1.8, + textAlign: TextAlign.center, + color: Colors.black) ], ), ),