jscti
Hi there It would be nice to be able to cancel a value change with `onValueChanged`. Use Case / example : - A checkbox to activate geolocating / notifications : anything related to Android System Permission - When activating the switch, we show a permission popup (async) - if user refuses : we want the switch to not change its states. so we would invalidate the change - if user accepts: let the switch state be changed or any other case needing a custom check I implemented it in a custom Preference and the changes are really small but maybe that could/should be a core feature of your lib : ``` fun PreferenceScope.PreferenceBool( ... onValueChange: (selected: Boolean) -> Boolean, ... ) { ... if (onValueChange(it)) { checked = it } ... } ``` Without this, it's painfull to revert the switch back on the "disabled" state. I needed to play with delay() to update the preference storage AFTER the onValueChanged finished its job and actually enabled the switch