Open
Description
What is the bug?
When I wrap a FlutterMap widget inside a scrollable parent, such as ListView or SingleChildScrollView, we should disable FlutterMap single finger gesture to ensure the page scroll behavior。 but the problem is the multiple fingers gesture such as pinchZoom seems to be affected and become insensitive.
and if i remove the scrollable parent, the multiple fingers gesture is sensitive!
How can we reproduce it?
class HomePage extends StatelessWidget {
const HomePage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
body: SingleChildScrollView(
child: Column(
children: [
Container(
width: double.infinity,
height: 300,
alignment: Alignment.center,
color: Colors.blue,
child: const Text(
'List Tile1',
style: TextStyle(fontSize: 24),
),
),
SizedBox(
width: double.infinity,
height: 400,
child: FlutterMap(
options: const MapOptions(
initialCenter: LatLng(51.5, -0.09),
initialZoom: 5,
interactionOptions: InteractionOptions(
flags: InteractiveFlag.all & ~InteractiveFlag.drag,
)),
children: [
TileLayer(
urlTemplate:
'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
userAgentPackageName:
'dev.fleaflet.flutter_map.example',
),
],
),
),
Container(
width: double.infinity,
height: 300,
alignment: Alignment.center,
color: Colors.blue,
child: const Text(
'List Tile 2',
style: TextStyle(fontSize: 24),
),
),
],
),
),
);
}
}
Do you have a potential solution?
No response