Luca Nicoletti
11/22/2019, 5:33 PMvar inputPosition: Offset? by +state { null as Offset? }
I updated it inside the PressGestureDetector
observer with: inputPosition = Offset(position.x.value, position.y.value)
then I have a @Composable
function that accept an Offset?
as input and Draw { canvas, _ -> canvas.drawCircle(pos, size.value, paint = paint) }
with that position.
I’m getting the following error as soon as the user tap somewhere:Yann Badoual
11/22/2019, 6:20 PMContainer(width = 50.dp, height = 50.dp) {
Draw { canvas, _ ->
canvas.drawCircle(
center = Offset(75f, 75f),
radius = 75f,
paint = Paint().apply {
color = Color.Blue
}
)
}
}
Leland Richardson [G]
11/22/2019, 6:41 PMLuca Nicoletti
11/25/2019, 8:45 AM