getPatients method
Implementation
Future<List<GroupScoped<EncryptedPatient>>> getPatients(String sdkId, String groupId, List<String> patientIds) async {
final res = await _methodChannel.invokeMethod<String>(
'PatientApi.inGroup.encrypted.getPatients',
{
"sdkId": sdkId,
"groupId": jsonEncode(groupId),
"patientIds": jsonEncode(patientIds.map((x0) => x0).toList()),
}
).catchError(convertPlatformException);
if (res == null) throw AssertionError("received null result from platform method getPatients");
final parsedResJson = jsonDecode(res);
return (parsedResJson as List<dynamic>).map((x1) => GroupScoped.fromJSON(
x1,
(x2) {
return EncryptedPatient.fromJSON(x2);
},
) ).toList();
}