Philip Dukhov05/12/2023, 10:47 AM
Row( modifier = modifier .background(backgroundColor, shape = shape) .padding( vertical = 4.dp, horizontal = 8.dp, ), verticalAlignment = Alignment.CenterVertically, )
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?
Row( verticalAlignment = Alignment.CenterVertically, modifier = modifier .background(backgroundColor, shape = shape) .padding( vertical = 4.dp, horizontal = 8.dp, ) )
Oleksandr Balan05/12/2023, 11:36 AM
Stylianos Gakis05/12/2023, 5:40 PM