Parameters
The color scheme to apply. Either “light” for light mode or “dark” for dark mode.
Sets the color scheme for this view and its descendants.
.colorScheme(scheme: "light" | "dark"): Component;
VStack([
Text("Always light mode"),
Button("Light Button", () => {})
]).colorScheme("light")
VStack([
Text("Always dark mode"),
Rectangle().fill(Color("primary"))
]).colorScheme("dark")