handleFallback method

  1. @override
Future<FallbackResult> handleFallback({
  1. required BiometricFallback type,
  2. required String reason,
})
override

Attempt a fallback authentication.

type — the fallback type (customPin, customPassword, etc.) reason — user-facing reason shown in the prompt

Returns the result of the fallback attempt.

Implementation

@override
Future<FallbackResult> handleFallback({
  required BiometricFallback type,
  required String reason,
}) async {
  return switch (type) {
    BiometricFallback.deviceCredential => _handleDeviceCredential(reason),
    BiometricFallback.customPin ||
    BiometricFallback.customPassword =>
      _handleCustomFallback(type, reason),
    BiometricFallback.none => Future.value(FallbackResult.cancelled),
  };
}