createPatient method
Future<GroupScoped<DecryptedPatient> >
createPatient(
- String sdkId,
- GroupScoped<
DecryptedPatient> patient
Implementation
Future<GroupScoped<DecryptedPatient>> createPatient(String sdkId, GroupScoped<DecryptedPatient> patient) async {
final res = await _methodChannel.invokeMethod<String>(
'PatientApi.inGroup.createPatient',
{
"sdkId": sdkId,
"patient": jsonEncode(GroupScoped.encode(
patient,
(x0) {
return DecryptedPatient.encode(x0);
},
)),
}
).catchError(convertPlatformException);
if (res == null) throw AssertionError("received null result from platform method createPatient");
final parsedResJson = jsonDecode(res);
return GroupScoped.fromJSON(
parsedResJson,
(x1) {
return DecryptedPatient.fromJSON(x1);
},
);
}