authenticate method

Future<bool> authenticate({
  1. String reason = 'Authenticate to continue',
})

Triggers a system biometric prompt with the specified reason.

Returns true if the user successfully authenticated.

Implementation

Future<bool> authenticate({String reason = 'Authenticate to continue'}) {
  if (reason.trim().isEmpty) {
    throw ArgumentError.value(
      reason,
      'reason',
      'Authentication reason cannot be empty.',
    );
  }
  return NexoraSdkPlatform.instance.authenticate(reason);
}