diff --git a/lib/src/custom_layout.dart b/lib/src/custom_layout.dart index 8ce77f2..55fd6a6 100644 --- a/lib/src/custom_layout.dart +++ b/lib/src/custom_layout.dart @@ -408,12 +408,14 @@ class _CustomLayoutState extends _CustomLayoutStateBase<_CustomLayoutSwiper> { super.didChangeDependencies(); _startIndex = widget.option.startIndex; _animationCount = widget.option.stateCount; + _currentIndex = widget.index; } @override void didUpdateWidget(_CustomLayoutSwiper oldWidget) { _startIndex = widget.option.startIndex; _animationCount = widget.option.stateCount; + _currentIndex = widget.index; super.didUpdateWidget(oldWidget); }