serenader2014 / flutter_carousel_slider

A flutter carousel widget, support infinite scroll, and custom child widget.
https://pub.dev/packages/carousel_slider
MIT License
1.61k stars 583 forks source link

disableGesture: true, no't work #438

Open bigbingg opened 7 months ago

davidequadrelli-b commented 7 months ago

Same problem. With the latest version of the library 4.2.1, when setting the property disableGesture: true the carousel still swipes. I also noticed that instead of sending CarouselPageChangedReason.manual reason in the onPageChanged listener, it sends CarouselPageChangedReason.controller.

EDIT: I solved the problem without the disableGesture property but using the NeverScrollableScrollPhysics()

scrollPhysics: shouldScroll ? scrollPhysics : const NeverScrollableScrollPhysics()
iCodeee commented 7 months ago

Same problem. With the latest version of the library 4.2.1, when setting the property disableGesture: true the carousel still swipes. I also noticed that instead of sending CarouselPageChangedReason.manual reason in the onPageChanged listener, it sends CarouselPageChangedReason.controller.

EDIT: I solved the problem without the disableGesture property but using the NeverScrollableScrollPhysics()

scrollPhysics: shouldScroll ? scrollPhysics : const NeverScrollableScrollPhysics()

you can use physics: widget.options.scrollPhysics

jishnulal-crypto commented 6 months ago

is this issue fixed

JosephNK commented 5 months ago

@jishnulal-crypto not yet.. not fixed.

I temporarily solved it using the AbsorbPointer widget.

AbsorbPointer(
  absorbing: true,
  child: CarouselSlider(
     ...
  )
)
kishan-dhankecha commented 5 months ago

@jishnulal-crypto, @JosephNK

This issue is already fixed and live on pub.dev, This is my own fork.

JosephNK commented 5 months ago

@kishan-dhankecha

I'm currently using the latest version 4.2.1, but it doesn't work.

disableGesture: true

Even with this setting, the gesture works.

There are various types of gestures, but if disableGesture: true, the first one works for manual scrolling.

kishan-dhankecha commented 5 months ago

Please click on the link given in above comment!!

JosephNK commented 5 months ago

@kishan-dhankecha Sorry. Has the carousel_slider plugin been replaced by the carousel_slider_plus plugin? Will the carousel_slider plugin not be updated in the future?

kishan-dhankecha commented 5 months ago

The carousel_slider is not maintained anymore so I have created my own fork carousel_slider_plus and pushed it on pub.dev.

I am also fixing some bugs that are being discovered in carousel_slider.

JosephNK commented 5 months ago

@kishan-dhankecha Thanks :)