initializeConfidentialSecretId method

Future<GroupScoped<EncryptedPatient>> initializeConfidentialSecretId(
  1. String sdkId,
  2. GroupScoped<EncryptedPatient> patient
)

Implementation

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