-
-
Notifications
You must be signed in to change notification settings - Fork 629
GFCarousel active page indicator is not being updated without "onPageChanged" #139
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
Comments
Hey @yasalkhatib, I solved this by wrapping it in my own StatefulWidget and calling setState(). This is a limitation they have. Something that I am trying to figures out now is how to actually start the indicators at the right "startingPageIndex" if I set an initialPage = 5, and I have 6 items, I want the dots to show active indicator at the end. However, it isn't doing this for me. |
That's correct you, need to wrap it in a stateful widget and then call setState({}) on onPageChanged callback. However, I believe, this is a bug and for sure is not the intended behavior. |
Regarding your question about "startingPageIndex". I faced the same problem. After reading the code, I found that the current implementation of GFCarousel doesn't take into consideration the initalPageIndex and always sets the dot index to 0. Could you please open a separate issue and I will comment on it with a possible solution. |
@yasalkhatib, sure. I created an issue here: #144 |
@yasalkhatib Hey, It will be fixed in upcoming version. Thank you |
I noticed that the active page indicator is not being updated without explicitly call setState on onPageChanged callback.
Currently, if I need to update the active page indicator, I have to use GFCarousel inside a stateful widget and set onPageChanged,
The text was updated successfully, but these errors were encountered: