getDocumentTemplateAttachment method

Future<Uint8List> getDocumentTemplateAttachment(
  1. String sdkId,
  2. String documentTemplateId,
  3. String attachmentId
)

Implementation

Future<Uint8List> getDocumentTemplateAttachment(String sdkId, String documentTemplateId, String attachmentId) async {
	final res = await _methodChannel.invokeMethod<String>(
		'DocumentTemplateApi.getDocumentTemplateAttachment',
		{
			"sdkId": sdkId,
			"documentTemplateId": jsonEncode(documentTemplateId),
			"attachmentId": jsonEncode(attachmentId),
		}
	);
	if (res == null) throw AssertionError("received null result from platform method getDocumentTemplateAttachment");
	final parsedResJson = jsonDecode(res);
	return base64Decode(parsedResJson as String);
}