getMessage method

Future<EncryptedMessage?> getMessage(
  1. String sdkId,
  2. String entityId
)

Implementation

Future<EncryptedMessage?> getMessage(String sdkId, String entityId) async {
	final res = await _methodChannel.invokeMethod<String>(
		'MessageBasicApi.getMessage',
		{
			"sdkId": sdkId,
			"entityId": jsonEncode(entityId),
		}
	).catchError(convertPlatformException);
	if (res == null) throw AssertionError("received null result from platform method getMessage");
	final parsedResJson = jsonDecode(res);
	return parsedResJson == null ? null : EncryptedMessage.fromJSON(parsedResJson);
}