tryDecrypt method

Future<List<Patient>> tryDecrypt(
  1. String sdkId,
  2. List<EncryptedPatient> patients
)

Implementation

Future<List<Patient>> tryDecrypt(String sdkId, List<EncryptedPatient> patients) async {
	final res = await _methodChannel.invokeMethod<String>(
		'PatientApi.tryDecrypt',
		{
			"sdkId": sdkId,
			"patients": jsonEncode(patients.map((x0) => EncryptedPatient.encode(x0)).toList()),
		}
	).catchError(convertPlatformException);
	if (res == null) throw AssertionError("received null result from platform method tryDecrypt");
	final parsedResJson = jsonDecode(res);
	return (parsedResJson as List<dynamic>).map((x1) => Patient.fromJSON(x1) ).toList();
}