sign method

  1. @override
Future<String?> sign(
  1. String key,
  2. String payload,
  3. AndroidPromptInfo androidPromptInfo,
  4. IOSPromptInfo iosPromptInfo,
)
override

Implementation

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

  return await methodChannel.invokeMethod<String>('sign', {
    'key': key,
    'payload': payload,
    'title': androidPromptInfo.title,
    'subtitle': androidPromptInfo.subtitle,
    'description': androidPromptInfo.description,
    'negativeButton': androidPromptInfo.negativeButton,
    'invalidatedByBiometricEnrollment':
        androidPromptInfo.invalidatedByBiometricEnrollment,
  });
}