modifyDocument method

Future<Document> modifyDocument(
  1. String sdkId,
  2. Document entity
)

Implementation

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