shareWith method

Future<DecryptedPatient> shareWith(
  1. String sdkId,
  2. String delegateId,
  3. DecryptedPatient patient,
  4. PatientShareOptions? options,
)

Implementation

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