tryDecrypt method

Future<HealthElement> tryDecrypt(
  1. String sdkId,
  2. EncryptedHealthElement healthElement
)

Implementation

Future<HealthElement> tryDecrypt(String sdkId, EncryptedHealthElement healthElement) async {
	final res = await _methodChannel.invokeMethod<String>(
		'HealthElementApi.tryDecrypt',
		{
			"sdkId": sdkId,
			"healthElement": jsonEncode(EncryptedHealthElement.encode(healthElement)),
		}
	);
	if (res == null) throw AssertionError("received null result from platform method tryDecrypt");
	final parsedResJson = jsonDecode(res);
	return HealthElement.fromJSON(parsedResJson);
}