recompose
recompose copied to clipboard
Formatting: When to use line breaks?
Currently we do not use line breaks for formatting.
So for example we'd create the following Text Composable:
Text(text = "I am a test", color = Color(0xffffcc00.toInt()), fontSize = 20.sp, modifier = Modifier.width(100.dp).background(Color(0xaa0000ff.toInt())))
We probably should define a threshold of number of arguments/modifier, where we start using line breaks, e.g.:
Text(
text = "I am a test",
color = Color(0xffffcc00.toInt()),
fontSize = 20.sp,
modifier = Modifier
.width(100.dp)
.background(Color(0xaa0000ff.toInt()))
)
Does ktlint have an opinion on that?