I have a simple widget:
class TestGoogleMap extends StatelessWidget {
const TestGoogleMap({Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Test Google Map'),
),
body: GoogleMap(
onTap: (LatLng ll) {
print('tapped Google Map');
},
initialCameraPosition: CameraPosition(target: LatLng(1.0, 1.0)),
),
);
}
}
When I tap the map, there is no output. What could be the issue?
Edit: I added a longPress function, and it seems that whenever I tap the map, the longPress function is triggered instead.