diff --git a/lib/src/swiper.dart b/lib/src/swiper.dart index 9783740..42ccc90 100644 --- a/lib/src/swiper.dart +++ b/lib/src/swiper.dart @@ -452,9 +452,7 @@ class _SwiperState extends _SwiperTimerMixin { } void _onIndexChanged(int index) { - setState(() { - _activeIndex = index; - }); + _activeIndex = index; if (widget.onIndexChanged != null) { widget.onIndexChanged(index); }