shareWithMany method

Implementation

Future<GroupScoped<HealthElement>> shareWithMany(String sdkId, GroupScoped<HealthElement> healthElement, Map<EntityReferenceInGroup, HealthElementShareOptions> delegates) async {
	final res = await _methodChannel.invokeMethod<String>(
		'HealthElementApi.inGroup.tryAndRecover.shareWithMany',
		{
			"sdkId": sdkId,
			"healthElement": jsonEncode(GroupScoped.encode(
				healthElement,
				(x0) {
					return HealthElement.encode(x0);
				},
			)),
			"delegates": jsonEncode(delegates.entries.map((x0) => {
				"k": EntityReferenceInGroup.encode(x0.key),
				"v": HealthElementShareOptions.encode(x0.value),
			}).toList()),
		}
	).catchError(convertPlatformException);
	if (res == null) throw AssertionError("received null result from platform method shareWithMany");
	final parsedResJson = jsonDecode(res);
	return GroupScoped.fromJSON(
		parsedResJson,
		(x1) {
			return HealthElement.fromJSON(x1);
		},
	);
}