AppTheme

fun AppTheme(darkTheme: Boolean = isSystemInDarkTheme(), content: () -> Unit)

Applies the application's Material theme to the provided content, switching between LightColors and DarkColors.

By default the theme follows the device's system dark-mode preference via isSystemInDarkTheme. Pass an explicit darkTheme value to override.

TODO fix issue with ktfmt formatting annotated high order functions. Current workaround below: lambda in this format content: (@Composable() () -> Unit) to allow spotlessApply

Parameters

darkTheme

Whether to use the dark color palette; defaults to the system setting.

content

The composable content to render inside the theme.