hasWriteAccess method

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

Implementation

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