createDocument method

Future<DecryptedDocument> createDocument(
  1. String sdkId,
  2. DecryptedDocument entity
)

Implementation

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