best-flutter / flutter_swiper

The best swiper for flutter , with multiple layouts, infinite loop. Compatible with Android & iOS.
MIT License
3.51k stars 717 forks source link

activeIndex问题 #2

Closed nevergoneok closed 6 years ago

nevergoneok commented 6 years ago

如果在任意一个tab跳转到新的页面,当finish新的页面后,activeIndex变为0

jzoom commented 6 years ago

推荐这么做,使用一个变量保存一下当前的activeIndex,然后将这个变量赋值给Swiper的index,并在onIndexChanged这个回调函数中同步这个变量的值,activeIndex就变成“受控”的了。 image

trungwebsite commented 5 years ago

It seems idex: _activeIndex you mention above only work with default layout. Tinder, Stack,.. doesn't work. Is it a bug. Please help. Thanks a lot.