We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3b69436 + a06403f commit acb8e62Copy full SHA for acb8e62
lib/components/carousel/gf_carousel.dart
@@ -182,7 +182,7 @@ class _GFCarouselState extends State<GFCarousel> with TickerProviderStateMixin {
182
}
183
184
Timer getPlayTimer() => Timer.periodic(widget.autoPlayInterval, (_) {
185
- if (widget.autoPlay) {
+ if (widget.autoPlay && widget.items.length > 1) {
186
widget.pageController.nextPage(
187
duration: widget.autoPlayAnimationDuration,
188
curve: widget.autoPlayCurve);
@@ -221,7 +221,7 @@ class _GFCarouselState extends State<GFCarousel> with TickerProviderStateMixin {
221
222
223
void onPageSlide(int index) {
224
- setState(() => index);
+ setState(() => currentSlide = index);
225
226
227
int currentSlide;
0 commit comments