wck
05/27/2022, 12:32 AMModifier as a parameter, apparently fillMaxWidth is ignored if passed like this.
@Composable
fun TextButton(
modifier: Modifier = Modifier.fillMaxWidth(),wck
05/27/2022, 1:32 AMtad
05/27/2022, 3:47 AMmodifier.fillMaxWidth()tad
05/27/2022, 3:47 AMLeland Richardson [G]
05/27/2022, 4:27 PMmodifier: Modifier = Modifier and then just start your modifier chain with that:
InternalTextButton(modifier = modifier.fillMaxWidth().etc(...)Leland Richardson [G]
05/27/2022, 4:28 PMthe first modifier parameter must: … are indicating what the convention is, not what is technically allowed/not allowed. what you wrote initially was perfectly valid kotlin, just not what you wanted 🙂dimsuz
06/01/2022, 10:42 AMconvention is to have the default expression just beOh, I guess I'll add it to the detekt-rules-compose as a new (togglable) rule. UPD: turns out there was already an issue-request for such a rulemodifier: Modifier = Modifier