shareWith method
Implementation
Future<EncryptedPatient> shareWith(String sdkId, String delegateId, EncryptedPatient patient, PatientShareOptions? options) async {
final res = await _methodChannel.invokeMethod<String>(
'PatientApi.encrypted.shareWith',
{
"sdkId": sdkId,
"delegateId": jsonEncode(delegateId),
"patient": jsonEncode(EncryptedPatient.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 EncryptedPatient.fromJSON(parsedResJson);
}