Compose SwiftUIv0.4.0
esc
GuideAPIGitHub
View modifier

colorScheme(_:)

A view modifier that maps SwiftUI's colorScheme.

iOS 17.0+macOS 14.0+tvOS 17.0+watchOS 10.0+
fun Modifier.colorScheme(colorScheme: ColorScheme): Modifier

Overview

Modifier.colorScheme(colorScheme = ColorScheme.…)

This is the Kotlin form of SwiftUI View.colorScheme(_:): SwiftUI documentation. In Swift it reads:

nonisolated func colorScheme(_ colorScheme: ColorScheme) -> some View

Topics

Overloads

fun Modifier.colorScheme(colorScheme: ColorScheme): Modifier
SwiftUI View.colorScheme(_:)