Barry Fawthrop
08/10/2025, 2:44 PMAniket Shinde
08/10/2025, 4:59 PMBarry Fawthrop
08/10/2025, 5:07 PMBarry Fawthrop
08/10/2025, 5:07 PMAniket Shinde
08/10/2025, 5:17 PMBarry Fawthrop
08/10/2025, 5:18 PMBarry Fawthrop
08/10/2025, 5:21 PMMaterialTheme(
colorScheme = theme,
) {
Column(
modifier = Modifier
.fillMaxSize()
.background(AppColors.silver)
) {
MainScreen starts with
MaterialTheme(
colorScheme = theme,
) {
Scaffold(
modifier = Modifier.fillMaxSize(),
topBar = {
Aniket Shinde
08/10/2025, 5:22 PMBarry Fawthrop
08/10/2025, 5:22 PMOhiorenua Aigboje
08/10/2025, 7:23 PMMaterialTheme(
colorScheme = if (isDark) DarkColorScheme else LightColorScheme,
) {
var login by remember { mutableStateOf(false) }
if (login) {
Column(Modifier.fillMaxSize()) { /* your login screen*/}
} else {
Scaffold(Modifier.fillMaxSize()) {/* Your main screen*/ }
}
}
Try this way and there should always be one material theme in your app.
I will also suggest using voyager it is the best screen, viewmodel and navigation for KMP and android.