flutter_carousel_slider icon indicating copy to clipboard operation
flutter_carousel_slider copied to clipboard

Feature proposal: disable user drag scroll

Open KissBalazs opened this issue 4 years ago • 4 comments

The slider can be used to animate a "wizard" screen, where the user can complete steps and proceed as the carousel slides. For navigating between screens, we use a carouselController, and a custom logic to step through the user on screens.

The only problem we face, is that there is no way to disable the manual drag touch. It would be really nice to prevent users from scrolling by touching and dragging the images from one side to the next.

https://user-images.githubusercontent.com/10611667/114444908-b14bc300-9bcf-11eb-916b-2e7c5fbdb4c5.mov

KissBalazs avatar Apr 12 '21 18:04 KissBalazs

Have you tried with this?

CarouselOptions( scrollPhysics: NeverScrollableScrollPhysics(), ),

longa78 avatar Apr 24 '21 04:04 longa78

Have you tried with this?

CarouselOptions( scrollPhysics: NeverScrollableScrollPhysics(), ),

Thank you for this solution! It can solve our immediate problem indeed. Although, this disables backward scrolling, which could be used otherwise, which is not nice but we can live with that for the time being.

KissBalazs avatar Apr 28 '21 11:04 KissBalazs

I would also really appreciate the possibility of disabling forward scrolling while still allow backward scrolling.

nietsmmar avatar Jan 21 '22 13:01 nietsmmar

Or maybe try AbsorbPointer(child: ....)

Terranic avatar Mar 18 '22 08:03 Terranic