setDocumentTemplateAttachment method

Future<DocumentTemplate> setDocumentTemplateAttachment(
  1. String sdkId,
  2. String documentTemplateId,
  3. Uint8List payload
)

Implementation

Future<DocumentTemplate> setDocumentTemplateAttachment(String sdkId, String documentTemplateId, Uint8List payload) async {
	final res = await _methodChannel.invokeMethod<String>(
		'DocumentTemplateApi.setDocumentTemplateAttachment',
		{
			"sdkId": sdkId,
			"documentTemplateId": jsonEncode(documentTemplateId),
			"payload": jsonEncode(base64Encode(payload as List<int>)),
		}
	);
	if (res == null) throw AssertionError("received null result from platform method setDocumentTemplateAttachment");
	final parsedResJson = jsonDecode(res);
	return DocumentTemplate.fromJSON(parsedResJson);
}