verify method

  1. @override
Future<bool> verify(
  1. String key,
  2. String payload,
  3. String signature,
  4. AndroidPromptInfo androidPromptInfo,
  5. IOSPromptInfo iosPromptInfo,
)
override

Implementation

@override
Future<bool> verify(
  String key,
  String payload,
  String signature,
  AndroidPromptInfo androidPromptInfo,
  IOSPromptInfo iosPromptInfo,
) async {
  if (Platform.isIOS) {
    return await methodChannel.invokeMethod<bool>('verify', {
          'key': key,
          'payload': payload,
          'signature': signature,
          'reason': iosPromptInfo.reason,
        }) ??
        false;
  }

  return await methodChannel.invokeMethod<bool>('verify', {
        'key': key,
        'payload': payload,
        'signature': signature,
        'title': androidPromptInfo.title,
        'subtitle': androidPromptInfo.subtitle,
        'description': androidPromptInfo.description,
        'negativeButton': androidPromptInfo.negativeButton,
        'invalidatedByBiometricEnrollment':
            androidPromptInfo.invalidatedByBiometricEnrollment,
      }) ??
      false;
}