DynamicMaterialTheme

fun DynamicMaterialTheme(seedColor: Color, useDarkTheme: Boolean = isSystemInDarkTheme(), withAmoled: Boolean = false, style: PaletteStyle = PaletteStyle.TonalSpot, contrastLevel: Double = Contrast.Default.value, shapes: Shapes = MaterialTheme.shapes, typography: Typography = MaterialTheme.typography, isExtendedFidelity: Boolean = false, animate: Boolean = false, animationSpec: AnimationSpec<Color> = spring(stiffness = Spring.StiffnessLow), content: @Composable () -> Unit)

A Material Theme that adapts to the given seed color.

You can access the current seed color via LocalDynamicMaterialThemeSeed.

Parameters

seedColor

The seed color to use for generating the color scheme.

useDarkTheme

Whether to use a dark theme or not.

withAmoled

Whether the dark scheme is used with Amoled screen (Pure dark).

style

The style of the color scheme.

contrastLevel

The contrast level of the color scheme.

isExtendedFidelity

Whether to use the extended fidelity color set. See MaterialDynamicColors.

animate

Whether to animate the color scheme or not.

animationSpec

The animation spec to use for animating the color scheme.

content

The Composable content of the theme.

See also


fun DynamicMaterialTheme(state: DynamicMaterialThemeState, shapes: Shapes = MaterialTheme.shapes, typography: Typography = MaterialTheme.typography, animate: Boolean = false, animationSpec: AnimationSpec<Color> = spring(stiffness = Spring.StiffnessLow), content: @Composable () -> Unit)

A Material Theme that adapts to the given DynamicMaterialThemeState.seedColor.

You can access the current seed color via LocalDynamicMaterialThemeSeed.

Parameters

state

The state of the dynamic material theme.

animate

Whether to animate the color scheme or not.

animationSpec

The animation spec to use for animating the color scheme.

content

The Composable content of the theme.

See also