Sam Stone
06/13/2023, 4:56 PM@Composable
fun FamilyTree(root: Person) {
Column(horizontalAlignment = Alignment.CenterHorizontally) {
PersonCard(root)
Row {
root.children.forEach { child ->
FamilyTree(child)
}
}
}
}
Kirill Grouchnikov
06/13/2023, 5:31 PMCanvas
to draw the relevant vertical and / or horizontal lines to create the overall visuals of the connected treeSam Stone
06/13/2023, 5:51 PMDrawScope.() -> Unit
, not @Composable
myanmarking
06/13/2023, 5:59 PMFamilyTree(
modifier = Modifier.drawBehind{
drawLine(
Color.Black,
Offset(x = 0, y = 0),
Offset(x = size.width / 2 (do whatever here), y = 0)
)
},
child = child
)
myanmarking
06/13/2023, 5:59 PMSam Stone
06/13/2023, 5:59 PMsize
?Sam Stone
06/13/2023, 6:00 PMKirill Grouchnikov
06/13/2023, 6:02 PMx,y
of the child node, only its dimensions which are available to it.Kirill Grouchnikov
06/13/2023, 6:05 PMKirill Grouchnikov
06/13/2023, 6:09 PMdewildte
06/13/2023, 7:45 PMSam Stone
02/04/2024, 8:00 PM