getDocument method

Future<DecryptedDocument> getDocument(
  1. String sdkId,
  2. String entityId
)

Implementation

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