getPatient method
Implementation
Future<GroupScoped<EncryptedPatient>?> getPatient(String sdkId, String groupId, String entityId) async {
final res = await _methodChannel.invokeMethod<String>(
'PatientApi.inGroup.encrypted.getPatient',
{
"sdkId": sdkId,
"groupId": jsonEncode(groupId),
"entityId": jsonEncode(entityId),
}
).catchError(convertPlatformException);
if (res == null) throw AssertionError("received null result from platform method getPatient");
final parsedResJson = jsonDecode(res);
return parsedResJson == null ? null : GroupScoped.fromJSON(
parsedResJson,
(x1) {
return EncryptedPatient.fromJSON(x1);
},
);
}