shareWith method
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);
}