decrypt method

Future<DecryptedMessage> decrypt(
  1. String sdkId,
  2. EncryptedMessage message
)

Implementation

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