I want to group two related components that are part of ConstraintLayout to a separate
@Composable
function. Currently I was planning to borrow the constraints from parent layout through
Modifier
type parameter.
@Composable
fun CustomGroup(
<required-fields>,
...,
firstComponentModifier: Modifier = Modifier,
secondComponentModifier: Modifier = Modifier,
...,
<other optional fields>
) { ... }
This seems to be working for me but the linter gives this
error warning:
“Modifier parameter should be named modifier”. I think my use-case is valid and we shouldn’t restrict modifier name to be modifier only or we should make
ConstrainedLayoutReferences
class public so that I could pass it on as parameter to other function