I'm trying to have a parent decide its children's positions based on information about its grandchildren (or other general data), passed upwards by its children.
This should be possible, since the measurement of a composable requires the children's measurement and layouting to be done. The only problem is how to get the data across the compose framework from the child to the parent.
What I have already found is the ParentDataModifier, but to my understanding I can only use it to pass data from the child's composition to the parent's layout phase as the Modifier is set before layouting starts and a composable can't change its own Modifier on the fly. Maybe it can still be used like I need it, but at least I haven't found a way.
The same thing goes for the ModifierLocal.
I was thinking about implementing my own MeasureResult and other classes to somehow get the data from the MeasureResult to the resulting Placeable in the parent, but that feels weird and hacky and is definitely not a simple solution.
Thank you sincerely for your help.