Checking out
dev03
changes and I am little bit wondered why the quite good structuring in
dev02
has been "abandoned" with "parameters" (here: modifiers):
//dev02
@Composable
private fun BottomBarAction(
@DrawableRes id: Int,
onClick: () -> Unit
) {
Ripple(
bounded = false,
radius = 24.dp
) {
Clickable(onClick = onClick) {
Padding(12.dp) {
Container(width = 24.dp, height = 24.dp) {
DrawVector(+vectorResource(id))
}
}
}
}
}
//dev03
@Composable
private fun BottomBarAction(
@DrawableRes id: Int,
onClick: () -> Unit
){
Ripple(
bounded = false,
radius = 24.dp
){
Clickable(onClick = onClick) {
Container(modifier = Spacing(12.dp) wraps Size(24.dp, 24.dp)) {
DrawVector(vectorImage = +vectorResource(id))
}
}
}
}
Before I felt i had control over the layout structure, but now
Padding
has become a
Spacing
modifier
whics
wraps
a
Size
.. ?
I somehow lost the control here. Or is there fear that the structuring will become too deep in complex layouts, and therefore it is parameterized, or is the situation simply that there are several parallel layers of structuring -> causing the parameterization.
RG