createHealthElement method

Implementation

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