decrypt method

Future<DecryptedHealthElement> decrypt(
  1. String sdkId,
  2. EncryptedHealthElement healthElement
)

Implementation

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