chris-horner
01/23/2021, 1:25 AMshowSnackbar
, but if my UI gets recomposed because of a configuration change the Snackbar will show again.
Is the recommended approach to handle the timing in whatever produces state, and after a period of time output state with showSnackbar = false
?Adam Powell
01/23/2021, 1:37 AMSnackbarHost
handles it: https://developer.android.com/reference/kotlin/androidx/compose/material/package-summary#snackbarhostSnackbarHostState
handles the state management and queuing behaviorjw
01/23/2021, 1:50 AMAdam Powell
01/23/2021, 3:12 AMSnackbarHost
does, it just scopes that timeout and shows the current content from the state