Biometric login fixed

flutter_3.16.0_zoom
haroon amjad 2 years ago
parent c47c93b2d9
commit d62c723685

@ -1,3 +1,5 @@
import 'dart:io';
import 'package:doctor_app_flutter/core/enum/auth_method_types.dart';
import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
@ -46,7 +48,7 @@ class _VerificationMethodsListState extends State<VerificationMethodsList> {
return MethodTypeCard(
assetPath: 'assets/images/svgs/verification/verify-finger.svg',
onTap: () async {
if (await widget.authenticationViewModel!.checkIfBiometricAvailable(BiometricType.fingerprint)) {
if (await widget.authenticationViewModel!.checkIfBiometricAvailable(Platform.isIOS ? BiometricType.fingerprint : BiometricType.strong)) {
widget.authenticateUser!(AuthMethodTypes.Fingerprint, true);
}
},
@ -57,7 +59,7 @@ class _VerificationMethodsListState extends State<VerificationMethodsList> {
return MethodTypeCard(
assetPath: 'assets/images/svgs/verification/verify-face.svg',
onTap: () async {
if (await widget.authenticationViewModel!.checkIfBiometricAvailable(BiometricType.face)) {
if (await widget.authenticationViewModel!.checkIfBiometricAvailable(Platform.isIOS ? BiometricType.face : BiometricType.strong)) {
widget.authenticateUser!(AuthMethodTypes.FaceID, true);
}
},

File diff suppressed because it is too large Load Diff

@ -35,7 +35,7 @@ dependencies:
# imei_plugin: ^1.2.0
# flutter_flexible_toast: ^0.1.4
fluttertoast: ^8.2.4
local_auth: ^2.1.7
local_auth: 2.1.8
http_interceptor: any
connectivity: ^3.0.6

Loading…
Cancel
Save