07/11/2022, 4:36 PM
Does anyone know if there’s a way to intercept the dismiss operation of the scrim was clicked? I don’t want to stop it from dismission, but i do want to log that it occurred. I could use the confirmStateChange as that does get called when the scrim is clicked, and appears to not be called if i programatically close using the .hide() function. But that seems odd to put it in the state.
                color = scrimColor,
                onDismiss = {
                    if (sheetState.confirmStateChange(Hidden)) {
                        scope.launch { sheetState.hide() }
                visible = sheetState.targetValue != Hidden
As a side question, under what other circumstances would confirmStateChange be called? I see a bunch of stuff in the semantics area, but on testing, i don’t see confirmStateChange called if i manually call hide().

Tristan Hamilton

08/09/2022, 11:35 AM
I actually left an answer that solves a similar issue to this here: so you could probably just observe