-
Notifications
You must be signed in to change notification settings - Fork 527
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
if(initial page != 0) the selected page is updated wrong in the slider #40
Comments
I also encountered this problem. |
same here |
@serenader2014 Same here |
@somnath121 @samuelgunawan @salehahmedZ have you resolved it in some way? |
Not yet. Still waiting for patch |
This code is working fine for me. @override
void initState() {
_current = widget.initialPage ?? 0;
pageController = new PageController(initialPage: widget.initialPage);
cs = CarouselSlider(
items: widget.images,
height: double.infinity,
viewportFraction: 1.0,
initialPage: widget.initialPage,
enableInfiniteScroll: false,
autoPlay: false,
onPageChanged: (index) {
setState(() {
_current = pageController.page.round();
});
},
enlargeCenterPage: false,
scrollDirection: Axis.horizontal,
);
pageController = cs.pageController;
super.initState();
} |
My bad - the fix works, problem was that I didn't do a full restart. |
No description provided.
The text was updated successfully, but these errors were encountered: