adjpd
09/12/2021, 2:17 PMColumn(horizontalAlignment = Alignment.CenterHorizontally)
to? Column(horizontalAlignment = .CenterHorizontally)
to improve readability? It would be a, seemingly, simply thing but would increase the readbility to codebases massively.josefdolezal
09/12/2021, 2:22 PMCenterHorizontally
like so:
import androidx.compose.ui.Alignment.Companion.CenterHorizontally
then use it directly:
Column(horizontalAlignment = CenterHorizontally)
adjpd
09/12/2021, 4:03 PM@Composable fun surface() = MaterialTheme.colors.surface
@Composable fun primary() = MaterialTheme.colors.primary
@Composable fun onPrimary() = MaterialTheme.colors.onPrimary
@Composable fun secondary() = MaterialTheme.colors.secondary
@Composable fun onSecondary() = MaterialTheme.colors.onSecondary
@Composable fun background() = MaterialTheme.colors.background
@Composable fun onBackground() = MaterialTheme.colors.onBackground
adjpd
09/12/2021, 4:05 PMval CenterHorizontally = Alignment.CenterHorizontally
val CenterVertically = Alignment.CenterVertically
josefdolezal
09/12/2021, 4:16 PM@Composable
like so:
val primary: Color
@Composable get() = colors.primary
I consider using colors.primary
a bit more readable than plain primary
/`primary()` , but that’s for sure a matter of preference 👍adjpd
09/12/2021, 4:36 PMMaterialTheme.typography
.Zach Klippenstein (he/him) [MOD]
09/12/2021, 5:15 PMjosefdolezal
09/12/2021, 5:52 PMokarm
09/12/2021, 8:19 PM