ComposeTheme
object ComposeTheme
Types
Link copied to clipboard
contrast types (normal, medium, high)
Link copied to clipboard
base theme to define if the dark/light or system derived color theme should be used
Link copied to clipboard
Link copied to clipboard
contrast types (system, normal, medium, high)
Link copied to clipboard
Link copied to clipboard
interface KeyProvider
Link copied to clipboard
class State(val base: State<ComposeTheme.BaseTheme>, val contrast: State<ComposeTheme.Contrast>, val dynamic: State<Boolean>, val theme: State<String>)
the current state of the theme
Link copied to clipboard
base theme interface
Functions
Link copied to clipboard
fun ComposeTheme.enableEdgeToEdge(activity: ComponentActivity, statusBarStyle: SystemBarStyle = SystemBarStyle.statusBar(), navigationBarStyle: SystemBarStyle = SystemBarStyle.navigationBar(), isStatusBarContrastEnforced: Boolean? = null, isNavigationBarContrastEnforced: Boolean? = null)
fun ComposeTheme.enableEdgeToEdge(activity: ComponentActivity, statusBarColor: Color, navigationBarColor: Color, statusBarIsDark: () -> Boolean = { statusBarColor.luminance() < .5f }, navigationBarIsDark: () -> Boolean = { navigationBarColor.luminance() < .5f }, isStatusBarContrastEnforced: Boolean? = null, isNavigationBarContrastEnforced: Boolean? = null)
enabled edgeToEdge and makes the system bars transparent so that the theme can apply its color correctly
Link copied to clipboard
Link copied to clipboard
get a list of all registered themes
Link copied to clipboard
register a theme so that ComposeThemer can find it by its key