shareWith method

Implementation

Future<GroupScoped<HealthElement>> shareWith(String sdkId, EntityReferenceInGroup delegate, GroupScoped<HealthElement> healthElement, HealthElementShareOptions? options) async {
	final res = await _methodChannel.invokeMethod<String>(
		'HealthElementApi.inGroup.tryAndRecover.shareWith',
		{
			"sdkId": sdkId,
			"delegate": jsonEncode(EntityReferenceInGroup.encode(delegate)),
			"healthElement": jsonEncode(GroupScoped.encode(
				healthElement,
				(x0) {
					return HealthElement.encode(x0);
				},
			)),
			"options": jsonEncode(options == null ? null : HealthElementShareOptions.encode(options!)),
		}
	).catchError(convertPlatformException);
	if (res == null) throw AssertionError("received null result from platform method shareWith");
	final parsedResJson = jsonDecode(res);
	return GroupScoped.fromJSON(
		parsedResJson,
		(x1) {
			return HealthElement.fromJSON(x1);
		},
	);
}