<Jetpack Compose: Loading Overlay controlled by se...
# stackoverflow
r
Jetpack Compose: Loading Overlay controlled by separate function not working I would like to show a loading overlay whit Jetpack Compose when the data is loading in background. My problem is that I am not able to transfer a boolean variable declared with by remeber into a second function. fun Show() { val showLoadingOverlay by remember { mutableStateOf(false) } loadDataInBackground(showLoadingOverlay) Box( contentAlignment = Alignment.Center, ) { if (showLoadingOverlay) { Box( Modifier...