Hi, I can't have my Material2 custom theme working, my theme is defined by
@Composable
fun AITheme(
content: @Composable () -> Unit
) {
MaterialTheme(
colors = AIColors,
typography = AITypography,
content = content
)
}
object AITheme {
val colors: Colors
@Composable
get() = MaterialTheme.colors
val typography: Typography
@Composable
get() = MaterialTheme.typography
}
And
AIColors
is a bunch of colors called inside
lightColors
, but when I write this
@Composable
@Preview
fun Login() {
Surface(
color = AITheme.colors.surface,
) {
Text("Hello World!", style = AITheme.typography.body1)
}
}
And call the
Login()
function inside my theme,
AITheme { Login() }
, I get a white Surface with white text, what am I doing wrong ? 🤔