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

Add vertical flip view to stack version. #22

Open BurykinNikolay opened 6 years ago

BurykinNikolay commented 6 years ago

Good day! How to make stack swiper like this? swiper

rurickdev commented 5 years ago

i just modded the _updateValues function in the stackViewState

void _updateValues() {
    if (widget.scrollDirection == Axis.horizontal) {
      double space = (_swiperWidth - widget.itemWidth) / 2;
      //! Here I changed the offsets values, changet the negatives to positives and positives to negatives
      offsets = [ space, (space / 3 * 2), space / 3, 0.0, -_swiperWidth ];
    }

The only probles its the gesture its inverted (swipe to left move the stack to right) and the list is too inverted (next item its at left and previus its at right)