DeAnthonee King
01/12/2024, 11:00 PM@Composable
fun ChildComponent(
modifier: Modifier = Modifier,
parentCallBack: (Boolean) -> Unit = {}, <----- is this Okay ?
showMoreButton: @Composable (() -> Unit)? = null
) {
SubcomposeLayout {
// some logic measurement stuff
fun addShowMoreButton(shouldShowMoreButton: Boolean, placeable: Placeable){
parentCallBack(shouldShowMoreButton) <------ is this Okay ?
if (showMoreButton != null) {
val showMoreButtonPlaceable = subcompose("showMoreButton") {
showMoreButton(). <------- is this Okay ?
}[0].measure(contentConstraints)
placeables.add(
showMoreButtonPlaceable to current.copy(...)
}
}
}
}
Thank you again for any all feedback regarding my question.Zach Klippenstein (he/him) [MOD]
01/16/2024, 10:26 PMDeAnthonee King
01/17/2024, 5:03 PM