I'm building a game where the user can select diferent shapes and drag them to a grid.
The game is working fine right now, but to know where the user is droping the object I am doing the following:
Position Y =
(dragDetails.offset.dy - ((heightOfScreen * sizeOfScrenBeforeGrid) + gridSquareSize)) + scrolledPixels,
So in order for this to work, I need to create a Container with a fix height for the content before the grid. Also I need to add a listener in order to know if the user scroll the page.
I would like to achieve the same, but instead of having the sizeOfScrenBeforeGrid and the scrolledPixels, I want to know the position of my dragged object relative to the grid widget where the user drop the object.
I tried to put a listener or a gesture detector in the grid, but it didnt work.
Someone can help me to achieve this?