shareWith method

Future<DecryptedInvoice> shareWith(
  1. String sdkId,
  2. String delegateId,
  3. DecryptedInvoice invoice,
  4. InvoiceShareOptions? options,
)

Implementation

Future<DecryptedInvoice> shareWith(String sdkId, String delegateId, DecryptedInvoice invoice, InvoiceShareOptions? options) async {
	final res = await _methodChannel.invokeMethod<String>(
		'InvoiceApi.shareWith',
		{
			"sdkId": sdkId,
			"delegateId": jsonEncode(delegateId),
			"invoice": jsonEncode(DecryptedInvoice.encode(invoice)),
			"options": jsonEncode(options == null ? null : InvoiceShareOptions.encode(options!)),
		}
	);
	if (res == null) throw AssertionError("received null result from platform method shareWith");
	final parsedResJson = jsonDecode(res);
	return DecryptedInvoice.fromJSON(parsedResJson);
}