shareWith method

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

Implementation

Future<Contact> shareWith(String sdkId, String delegateId, Contact contact, ContactShareOptions? options) async {
	final res = await _methodChannel.invokeMethod<String>(
		'ContactApi.tryAndRecover.shareWith',
		{
			"sdkId": sdkId,
			"delegateId": jsonEncode(delegateId),
			"contact": jsonEncode(Contact.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 Contact.fromJSON(parsedResJson);
}