|
|
|
@ -1,3 +1,5 @@
|
|
|
|
|
|
|
|
import 'dart:io';
|
|
|
|
|
|
|
|
|
|
|
|
import 'package:doctor_app_flutter/core/enum/auth_method_types.dart';
|
|
|
|
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/authentication_view_model.dart';
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/project_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(
|
|
|
|
return MethodTypeCard(
|
|
|
|
assetPath: 'assets/images/svgs/verification/verify-finger.svg',
|
|
|
|
assetPath: 'assets/images/svgs/verification/verify-finger.svg',
|
|
|
|
onTap: () async {
|
|
|
|
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);
|
|
|
|
widget.authenticateUser!(AuthMethodTypes.Fingerprint, true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
@ -57,7 +59,7 @@ class _VerificationMethodsListState extends State<VerificationMethodsList> {
|
|
|
|
return MethodTypeCard(
|
|
|
|
return MethodTypeCard(
|
|
|
|
assetPath: 'assets/images/svgs/verification/verify-face.svg',
|
|
|
|
assetPath: 'assets/images/svgs/verification/verify-face.svg',
|
|
|
|
onTap: () async {
|
|
|
|
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);
|
|
|
|
widget.authenticateUser!(AuthMethodTypes.FaceID, true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|