canUseBiometric property

Future<Response<T>> get canUseBiometric

Implementation

Future<Response<T>> get canUseBiometric async {
  try {
    final auth = await _auth;
    final provider = Provider.from(auth?.provider);
    if (auth == null || !auth.isLoggedIn || !provider.isAllowBiometric) {
      return Response(
        status: Status.notSupported,
        error: "User not logged in with email or username!",
      );
    }
    return Response(status: Status.ok, data: auth);
  } catch (error) {
    return Response(status: Status.failure, error: error.toString());
  }
}