createHealthElement method

Future<DecryptedHealthElement> createHealthElement(
  1. String sdkId,
  2. DecryptedHealthElement entity
)

Implementation

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