From d8d2e7f1d649c88ef8db297eaaf74ffcb7154b00 Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Sun, 14 Feb 2021 11:19:30 +0200 Subject: [PATCH] fix ios issues --- .../prescription/add_prescription_form.dart | 14 +++++++------- .../prescription/update_prescription_form.dart | 12 ++---------- lib/widgets/auth/verification_methods.dart | 13 ++++--------- 3 files changed, 13 insertions(+), 26 deletions(-) diff --git a/lib/screens/prescription/add_prescription_form.dart b/lib/screens/prescription/add_prescription_form.dart index f262a0f6..f00bfe72 100644 --- a/lib/screens/prescription/add_prescription_form.dart +++ b/lib/screens/prescription/add_prescription_form.dart @@ -343,17 +343,17 @@ class _PrescriptionFormWidgetState extends State { .width * 0.550, child: TextFields( - inputFormatters: [ - LengthLimitingTextInputFormatter( - 4), - WhitelistingTextInputFormatter - .digitsOnly - ], + // inputFormatters: [ + // LengthLimitingTextInputFormatter( + // 4), + // WhitelistingTextInputFormatter + // .digitsOnly + // ], hintText: TranslationBase.of(context) .strength, controller: strengthController, - keyboardType: TextInputType.number, + keyboardType: TextInputType.numberWithOptions(decimal: true,), onChanged: (String value) { setState(() { strengthChar = value.length; diff --git a/lib/screens/prescription/update_prescription_form.dart b/lib/screens/prescription/update_prescription_form.dart index af1fbb07..938f24bc 100644 --- a/lib/screens/prescription/update_prescription_form.dart +++ b/lib/screens/prescription/update_prescription_form.dart @@ -562,11 +562,7 @@ class _UpdatePrescriptionFormState extends State { child: TextField( decoration: textFieldSelectorDecoration( - model - .patientAssessmentList[ - 0] - .icdCode10ID - .toString(), + model.patientAssessmentList.isNotEmpty? model.patientAssessmentList[0].icdCode10ID.toString():'', indication != null ? indication['name'] : null, @@ -592,11 +588,7 @@ class _UpdatePrescriptionFormState extends State { maxLines: 3, decoration: textFieldSelectorDecoration( - model - .patientAssessmentList[ - 0] - .asciiDesc - .toString(), + model.patientAssessmentList.isNotEmpty? model.patientAssessmentList[0].asciiDesc.toString():'', indication != null ? indication['name'] : null, diff --git a/lib/widgets/auth/verification_methods.dart b/lib/widgets/auth/verification_methods.dart index 04a82a80..adb0aef0 100644 --- a/lib/widgets/auth/verification_methods.dart +++ b/lib/widgets/auth/verification_methods.dart @@ -233,11 +233,7 @@ class _VerificationMethodsState extends State { Expanded( child: InkWell( onTap: () => { - authenticateUser( - 3, - BiometricType - .face.index, - authProv) + authenticateUser(3, true, authProv) }, child: getButton( user.logInTypeID, @@ -488,8 +484,7 @@ class _VerificationMethodsState extends State { onTap: () => { if (checkIfBiometricAvailable(BiometricType.fingerprint)) { - authenticateUser( - 3, BiometricType.fingerprint.index, authProv) + authenticateUser(3, true, authProv) } }, child: RoundedContainer( @@ -524,7 +519,7 @@ class _VerificationMethodsState extends State { return InkWell( onTap: () { if (checkIfBiometricAvailable(BiometricType.face)) { - authenticateUser(4, BiometricType.face.index, authProv); + authenticateUser(4, true, authProv); } }, child: RoundedContainer( @@ -706,7 +701,7 @@ class _VerificationMethodsState extends State { } loginWithFingurePrintFace(type, isActive, authProv) async { - if (isActive == 1) { + if (isActive) { // this.startBiometricLoginIfAvailable(); authenticated = await auth.authenticateWithBiometrics( localizedReason: 'Scan your fingerprint to authenticate',