I'm developing a small game with a scrollable map and levels. I have a scrollable map in a SingleChildScrollView. I want to put my Positioned Widgets (my levels) on my map.
I used this formula to find map resolution: width_map/height_map. I used this formula to find left distance: MediaQuery_width * resolution_map * custom_width_position. I used this formula to find height distance: MediaQuery_height * resolution_map * custom_height_position.
Positioned(
left: width * sizeMap * level['width'],
top: height * sizeMap * level['height'],
child: ...
)
This formula with different smartphones has different result => the levels are not on the identical place on map (they are near but places not corresponding). Any ideas?
Thanks in advance.