revokeAllPermissions static method
Implementation
static Future<bool> revokeAllPermissions({
required String connectionId,
}) async {
if (!Platform.isAndroid) {
return false;
}
final result = await _channel.invokeMethod('revokeAllPermissions', {
'connectionId': connectionId,
});
ExceptionHandler.checkException(result);
final prefs = await SharedPreferences.getInstance();
if (result == true) {
prefs.setInt(_healthConnectCancelStorageKey, 0);
return true;
}
return false;
}