Zoltan Demant
06/21/2022, 4:06 AMDropdownMenu
? It seems to inherit it from the theme internally. Using Modifier.background
doesnt work in the sense that Im able to see parts of the inherited background as well.Dmitry Strekha
06/21/2022, 7:25 AMDropdownMenu
using CompositionLocal
Zoltan Demant
06/21/2022, 7:28 AMDropdownMenu
.steelahhh
06/21/2022, 7:44 AMDropdownMenu
in a custom component and doing this:
@Composable
internal fun ProvidersOverrides(
colors: Colors = MaterialDebugColors,
content: @Composable () -> Unit
) {
MaterialTheme(
colors = colors,
shapes = Shapes(),
) {
CompositionLocalProvider(
LocalRippleTheme provides AppRippleTheme,
LocalTextSelectionColors provides AppTextSelectionColors,
) {
content()
}
}
}
With the actual component looking like this:
fun DropdownMenu(...proxy params...) {
ProvidersOverrides(
colors = MaterialDebugColors.copy(surface = AppTheme.colors.surface)
) {
DropdownMenu(...proxy params...)
}
}
Zoltan Demant
06/21/2022, 7:49 AM