it's my first time working with flutter and I'm currently trying to implement a map with different icons. by clicking on an icon a pop up window should appear. I've watched some youtube videos now and tried to implement an AlertDialog in different ways now but everytime i click on an icon the pop up window won't show up. I'd really appreciate some help, thank you!! is it possible that the markerlayeris blocking the interaction?
here's my relevant code snippet:
return MarkerLayer(
markers: pois.map(
(poi) =>
Marker(
width: 30.0,
height: 30.0,
point: LatLng(poi.latitude, poi.longitude),
child: GestureDetector(
child: Icon(
Icons.location_pin,
size: 40.0,
color: Colors.red,
),
onTap: () {
showDialog(
context: context,
builder: (context) {
return AlertDialog(
title: Text('title'),
content: Text('description'),
actions: [
TextButton(
child: Text('Cancel'),
onPressed: () {
Navigator.of(context).pop();
},
),
],
);
},
);
},
),
),
).toList(),
);