flutter_carousel_slider
flutter_carousel_slider copied to clipboard
handle onTap event also
Hello,
I noticed the carousel does not scroll when I tap on the next or previous items. It only reacts to dragging.
Sorry, can you provide more info?
I think it would be Gesture Detection. When you tap on an image there is no scroll to it at the moment. You have to hold and scroll...
Hi @giorgio79 , I think you can wrap your carousel slider children in a gesture detector, and add this functionality in the gesture detector callback.
Hello, this is a continuation of the previous request as I also need this in my application. I have put an InkWell in my carousel items, but how can I access the value of the current page within that scope? I use onPageChanged (value, reason) to update my widget state. Thanks in advance!
Hello.,did you solve this? ie: if you want to see full screen one of the image of the carrousel when you tap in this? how do you manage the ontap event to open the selected(tapped) image?
Yes. In your case, wrap each item in a gesture detector / inkwell, and onTap, navigate to a new screen/dialog passing the index of the current item.
That is not working, when u wrap Item with GestureDetector you should tap twice for onTap functionality... First tap always used to stop the animation of Carousel.
That is not working, when u wrap Item with GestureDetector you should tap twice for onTap functionality... First tap always used to stop the animation of Carousel.
I experience the same behavior, is there some way to call the onTap method inside each item when the CrouselSlider is animating during autoplay animation?