My problem should be simple, but i'm stuck: i need to display the image of a map with a marker over it (that's why i'm using a stack) and this image can be zoomed and panned. The only problem is, when i open the app the image is totally zoomed in, and i have to zoom out manually. I tried reading the docs and googling but i only found libraries which don't suit my needs or don't work as expected.
So, the question is simple: how can i see the fully zoomed out image from the beginning?
Here's the code.
return Container(
height: 350,
child: InteractiveViewer(
// TODO the image is automatically zoomed in!
minScale: .1,
maxScale: 1,
constrained: false,
child: Stack(children: [
Image.asset(itinerary.mapImage, fit: BoxFit.fitWidth),
icon(...),
])
)
)