Reputation: 1
I just want to change the color of the default title bar that comes with Windows, according to our system color, that's all. For example, currently my app's title bar is white even though my system theme is dark. In the desktop application I made with Flutter, the title bar changed automatically according to the system theme. I would be very grateful if you could provide a code example or source, thank you in advance to anyone who will help.
import androidx.compose.material.*
import androidx.compose.ui.window.Window
import androidx.compose.ui.window.application
import androidx.compose.ui.window.rememberWindowState
fun main() = application {
val windowState = rememberWindowState()
Window(
onCloseRequest = ::exitApplication,
state = windowState,
title = "Compose Title Bar"
) {
MaterialTheme(
colors = darkColors()
) {
Text("Hello World!")
}
}
}
Upvotes: 0
Views: 39