Mjahangiry75
03/14/2021, 11:56 AMMaterialTheme.Typography through data class property and it's not possible because the MaterialTheme.Typography is a Composable so we can't use it in non-composable. and now the question is how can I achieve that?
the code is in thread to take less space.Mjahangiry75
03/14/2021, 11:58 AM@Stable
internal data class Format(
val title: String,
val value: String,
val textStyle: TextStyle? = null
)
usage:
title = "Heading 1",
value = "h1",
textStyle = MaterialTheme.typography.h1
)