zyzdev / flutter_street_view

10 stars 29 forks source link

Inside ListView Animating StreetView Camera Up & Down is hard #18

Closed Aristidios closed 1 year ago

Aristidios commented 1 year ago

Hello 👋,

First of all thanks for your package it's great,

I'm having issues when using FlutterGoogleStreetView() inside a ListView as the scrolling of the vertical ListView conflicts with the gesture to moveCamera Up & Down on touch devices - any ideas how to solve this ?

Also the Google Maps credits titles move up & down while scrolling

zyzdev commented 1 year ago

IgnorePointer may helpful. You should decide which widget(ListView or FlutterGoogleStreetView) can consume the touch event.

Aristidios commented 1 year ago

@zyzdev Thanks for you answer, the thing is FlutterGoogleStreetView is a child of ListView therefore IgnorePointer will also prevent touch events on FlutterGoogleStreetView :/

zyzdev commented 1 year ago

@Aristidios Try feeding gestureRecognizers

FlutterGoogleStreetView(
 ...
   gestureRecognizers: <Factory<OneSequenceGestureRecognizer>>{
       Factory<OneSequenceGestureRecognizer>(
          () => EagerGestureRecognizer(),
      ),
   },
...
)
zyzdev commented 1 year ago

Feeding gestureRecognizers like below should solve this issue.

FlutterGoogleStreetView(
 ...
   gestureRecognizers: <Factory<OneSequenceGestureRecognizer>>{
       Factory<OneSequenceGestureRecognizer>(
          () => EagerGestureRecognizer(),
      ),
   },
...
)