authenticate method

  1. @override
Future<String?> authenticate(
  1. BiometricPromptInfo promptInfo,
  2. String cipherText
)
override

Implementation

@override
Future<String?> authenticate(
  BiometricPromptInfo promptInfo,
  String cipherText,
) async {
  dynamic arguments = {
    'cipherText': cipherText,
  };
  if (promptInfo.title != null) {
    arguments['title'] = promptInfo.title;
  }
  if (promptInfo.subtitle != null) {
    arguments['subtitle'] = promptInfo.subtitle;
  }
  if (promptInfo.description != null) {
    arguments['description'] = promptInfo.description;
  }
  if (promptInfo.negativeButton != null) {
    arguments['negativeButton'] = promptInfo.negativeButton;
  }
  return await methodChannel.invokeMethod('authenticate', arguments);
}