shareWith method

Future<EncryptedHealthElement> shareWith(
  1. String sdkId,
  2. String delegateId,
  3. EncryptedHealthElement healthElement,
  4. HealthElementShareOptions? options,
)

Implementation

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