logReceipt method

Future<Receipt> logReceipt(
  1. String sdkId,
  2. User user,
  3. String docId,
  4. List<String> refs,
  5. String blobType,
  6. Uint8List blob,
)

Implementation

Future<Receipt> logReceipt(String sdkId, User user, String docId, List<String> refs, String blobType, Uint8List blob) async {
	final res = await _methodChannel.invokeMethod<String>(
		'ReceiptApi.logReceipt',
		{
			"sdkId": sdkId,
			"user": jsonEncode(User.encode(user)),
			"docId": jsonEncode(docId),
			"refs": jsonEncode(refs.map((x0) => x0).toList()),
			"blobType": jsonEncode(blobType),
			"blob": jsonEncode(base64Encode(blob as List<int>)),
		}
	);
	if (res == null) throw AssertionError("received null result from platform method logReceipt");
	final parsedResJson = jsonDecode(res);
	return Receipt.fromJSON(parsedResJson);
}