shareWith method

Future<DecryptedContact> shareWith(
  1. String sdkId,
  2. String delegateId,
  3. DecryptedContact contact,
  4. ContactShareOptions? options,
)

Implementation

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