-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Open
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: platform-viewsEmbedding Android/iOS views in Flutter appsEmbedding Android/iOS views in Flutter appsf: gesturesflutter/packages/flutter/gestures repository.flutter/packages/flutter/gestures repository.found in release: 2.3Found to occur in 2.3Found to occur in 2.3frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: mapsGoogle Maps pluginGoogle Maps pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.team-ecosystemOwned by Ecosystem teamOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem teamTriaged by Ecosystem team
Description
In my app I have a GoogleMap widget that is the child of a GestureDetector widget.
I need to set a variable every time the user moves the map (pan, scale, etc) and I'm using the GestureDetector for that. Also, I need the map to simultaneously receive the gestures, in order the be interactive.
My code kind of works, but it is not responsible or reliable on scale (pinch) gestures. Sometimes the events are handled by the map and other times they aren't. Pan events (drag with one finger) are handled just fine.
Any idea on that is causing this behavior?
Here is the code...
return Scaffold(
body: GestureDetector(
onPanStart: (val) {
Logger.red("Parent: I'm panning...");
_followPosition = false;
},
behavior: HitTestBehavior.opaque,
child: GoogleMap(
gestureRecognizers: [
Factory<PanGestureRecognizer>(() => PanGestureRecognizer()),
Factory<ScaleGestureRecognizer>(() => ScaleGestureRecognizer()),
].toSet(),
initialCameraPosition: _cameraPosition,
onMapCreated: (GoogleMapController controller) =>
_handleMapCreated(controller),
onCameraMove: (CameraPosition cameraPosition) =>
_handleCameraMove(cameraPosition),
onCameraIdle: () => _handleCameraIdle(),
),
),
);
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: platform-viewsEmbedding Android/iOS views in Flutter appsEmbedding Android/iOS views in Flutter appsf: gesturesflutter/packages/flutter/gestures repository.flutter/packages/flutter/gestures repository.found in release: 2.3Found to occur in 2.3Found to occur in 2.3frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: mapsGoogle Maps pluginGoogle Maps pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.team-ecosystemOwned by Ecosystem teamOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem teamTriaged by Ecosystem team