najdat Akkad
najdat Akkad

Reputation: 195

How to show half of near pages stacked beneath the current page in PageView?

Is there a way to implement this using PageView, any other package or even manually?

enter image description here

Upvotes: 0

Views: 253

Answers (1)

Ayad
Ayad

Reputation: 691

You can achieve the same result using this package https://pub.dev/packages/flutter_swiper. You can customize the position of the cards to get the design you want

You can use the customLayoutOption to modify the position and can get the desired position.

customLayoutOption: CustomLayoutOption(
                      startIndex: 1,
                      stateCount: 4,
                    ).addTranslate([
                      Offset(0.0, 0.0),
                      Offset(0.0, 0.0),
                      Offset(0.0, 0.0),
                      Offset(0.0, 0.0),
                    ]).addScale([1, 0.8, 0.6, 0.4], Alignment.bottomLeft),

Upvotes: 2

Related Questions