initializeConfidentialSecretId method

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

Implementation

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