hasWriteAccess method

Future<bool> hasWriteAccess(
  1. String sdkId,
  2. GroupScoped<HealthElement> healthElement
)

Implementation

Future<bool> hasWriteAccess(String sdkId, GroupScoped<HealthElement> healthElement) async {
	final res = await _methodChannel.invokeMethod<String>(
		'HealthElementApi.inGroup.hasWriteAccess',
		{
			"sdkId": sdkId,
			"healthElement": jsonEncode(GroupScoped.encode(
				healthElement,
				(x0) {
					return HealthElement.encode(x0);
				},
			)),
		}
	).catchError(convertPlatformException);
	if (res == null) throw AssertionError("received null result from platform method hasWriteAccess");
	final parsedResJson = jsonDecode(res);
	return (parsedResJson as bool);
}