Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

carousel slider swipe issue #424

Open
Praneethfleet opened this issue Sep 27, 2023 · 1 comment
Open

carousel slider swipe issue #424

Praneethfleet opened this issue Sep 27, 2023 · 1 comment

Comments

@Praneethfleet
Copy link

Praneethfleet commented Sep 27, 2023

In flutter on my survey page, there are list of questions and some questions are mandatory and must be answered without skipping. I used a "carousel_slider" but due to this, I was able to move to the next question even if it was mandatory while swiping. Help me to sort this issue.

  • CarouselSlider(

                    carouselController: carouselController,
                    items: surveyList,
                    options: CarouselOptions(
                      height: 800,
                      aspectRatio: 16 / 9,
                      enlargeCenterPage: true,
                      viewportFraction: 0.90,
                      enableInfiniteScroll: false,
                      onPageChanged: (currentIndex, reason) {
                        setState(
                          () {
                            surveyController.currentIndex.value =
                                currentIndex;
                          },
                        );
                      },
                    ),
                  ),
    
@Praneethfleet Praneethfleet changed the title carousel slider issue carousel slider swipe issue Sep 27, 2023
@kishan-dhankecha
Copy link

Hi, @Praneethfleet

You can now use disableGesture property to achieve your desired action. You can do that via my fork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants