createContact method

Future<EncryptedContact> createContact(
  1. String sdkId,
  2. EncryptedContact entity
)

Implementation

Future<EncryptedContact> createContact(String sdkId, EncryptedContact entity) async {
	final res = await _methodChannel.invokeMethod<String>(
		'ContactApi.encrypted.createContact',
		{
			"sdkId": sdkId,
			"entity": jsonEncode(EncryptedContact.encode(entity)),
		}
	).catchError(convertPlatformException);
	if (res == null) throw AssertionError("received null result from platform method createContact");
	final parsedResJson = jsonDecode(res);
	return EncryptedContact.fromJSON(parsedResJson);
}