flutter_carousel_slider icon indicating copy to clipboard operation
flutter_carousel_slider copied to clipboard

disableGesture: true, no't work

Open bigbingg opened this issue 1 year ago • 10 comments

bigbingg avatar Apr 16 '24 07:04 bigbingg

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()

davidequadrelli-b avatar Apr 19 '24 10:04 davidequadrelli-b

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

iCodeee avatar Apr 28 '24 09:04 iCodeee

is this issue fixed

jishnulal-crypto avatar May 22 '24 07:05 jishnulal-crypto

@jishnulal-crypto not yet.. not fixed.

I temporarily solved it using the AbsorbPointer widget.

AbsorbPointer(
  absorbing: true,
  child: CarouselSlider(
     ...
  )
)

JosephNK avatar Jun 19 '24 05:06 JosephNK

@jishnulal-crypto, @JosephNK

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

kishan-dhankecha avatar Jun 19 '24 05:06 kishan-dhankecha

@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.

JosephNK avatar Jun 19 '24 07:06 JosephNK

Please click on the link given in above comment!!

kishan-dhankecha avatar Jun 19 '24 07:06 kishan-dhankecha

@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?

JosephNK avatar Jun 19 '24 11:06 JosephNK

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.

kishan-dhankecha avatar Jun 19 '24 12:06 kishan-dhankecha

@kishan-dhankecha Thanks :)

JosephNK avatar Jun 20 '24 05:06 JosephNK