tryDecrypt method

Future<Message> tryDecrypt(
  1. String sdkId,
  2. EncryptedMessage message
)

Implementation

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