You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I specify an initialItem other than 0 to the controller of the slider, it shows the right item selected, but the scroll stays at 0, like if the selected item was the first one
Then if we move a bit the slider after it was created, it immediately jumps to the position where it should have been
Steps to Reproduce
open the file record_box_view.dart in the example of the package
in the _buildCarousel method, in the CustomCarousel widget:
remove the loop property (not required but it makes the bug more obvious)
My workaround is to not set the initialIndex but instead jump to the item using WidgetsBinding.instance.addPostFrameCallback((_) => _controller.jumpToItem(initialIndex));.
It creates a small glitch though so a proper solution would be nice.
Other than that I'm super happy with this package, thanks a lot 🙏
Describe the bug
When I specify an initialItem other than 0 to the controller of the slider, it shows the right item selected, but the scroll stays at 0, like if the selected item was the first one
Then if we move a bit the slider after it was created, it immediately jumps to the position where it should have been
Steps to Reproduce
CustomCarousel
widget:loop
property (not required but it makes the bug more obvious)controller: CustomCarouselScrollController(initialItem: 4),
controller.jumpToItem(4)
environement
tested on Android 12
Version 0.1.0+1
Great package by the way, thanks! 🙏
The text was updated successfully, but these errors were encountered: