Philip Dukhov
05/12/2023, 10:47 AMRow(
modifier = modifier
.background(backgroundColor, shape = shape)
.padding(
vertical = 4.dp,
horizontal = 8.dp,
),
verticalAlignment = Alignment.CenterVertically,
)
vs
Row(
verticalAlignment = Alignment.CenterVertically,
modifier = modifier
.background(backgroundColor, shape = shape)
.padding(
vertical = 4.dp,
horizontal = 8.dp,
)
)
The main reason for me is that as the last parameter I don't need to use a comma. This way I can reorder modifier lines, copy/paste them without thinking about the comma, the diff in git look cleaner, and so does the code itself - when the last parameter line is indented compared to the beginning of other parameters, it catches my eye - but it's just a habit, for sure
So those are my reasons for using it as the last parameter, if you use it as the first - what are your reasons? Are there any advantages?Oleksandr Balan
05/12/2023, 11:36 AMStylianos Gakis
05/12/2023, 5:40 PM