Skip to content

Instantly share code, notes, and snippets.

@CostaFot
Last active March 13, 2024 01:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CostaFot/b97897e22c5dfe6727c8030e99c75870 to your computer and use it in GitHub Desktop.
Save CostaFot/b97897e22c5dfe6727c8030e99c75870 to your computer and use it in GitHub Desktop.
@Composable
private fun MainContent(
changeSystemBarStyle: (SystemBarStyle) -> Unit // pass function from top level to change the SystemBarStyle
) {
Scaffold(
modifier = Modifier.fillMaxSize(),
containerColor = Color.Black
) { paddingValues ->
LaunchedEffect(Unit) {
changeSystemBarStyle(SystemBarStyle.dark(android.graphics.Color.TRANSPARENT))
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment