julioromano
03/22/2022, 2:27 PMLayout()
composable is there a way to somehow group the `measurables`/`placeables` by some property of my data model?
I’m trying to create a custom layout composable which places its children according to some property of the data model from which the children themselves are created.
But from within the Layout()
block the children are exposed as `measurable`/`placeable` so there is no visibility into their props.
Is there a way to pass any property from my data model or from the child composables into their respective measurables/placeables? Or any other way to achieve this (e.g. meta-data or anything else)?Albert Chang
03/22/2022, 2:51 PMModifier.layoutId()
or ParentDataModifier
.julioromano
03/22/2022, 2:56 PMModifier.layoutId()
? I mean it’s not stuff that must be able to go in bundles/parcelables? Can I just pass in there a reference to a huge data class?julioromano
03/22/2022, 2:59 PMParentDataModifier
” do you mean to create my own modifier instead of using Modifier.layoutId()
?nitrog42
03/22/2022, 3:00 PMAlbert Chang
03/22/2022, 3:03 PMCan I pass any object into Modifier.layoutId() ?
Yes you can pass any object.
By “Using ParentDataModifier ” do you mean to create my own modifier instead of using Modifier.layoutId() ?
Yes.