tryDecrypt method

Future<Contact> tryDecrypt(
  1. String sdkId,
  2. EncryptedContact contact
)

Implementation

Future<Contact> tryDecrypt(String sdkId, EncryptedContact contact) async {
	final res = await _methodChannel.invokeMethod<String>(
		'ContactApi.tryDecrypt',
		{
			"sdkId": sdkId,
			"contact": jsonEncode(EncryptedContact.encode(contact)),
		}
	);
	if (res == null) throw AssertionError("received null result from platform method tryDecrypt");
	final parsedResJson = jsonDecode(res);
	return Contact.fromJSON(parsedResJson);
}