Paging by item Flutter

157 Views Asked by At

i would like to achieve pagination with flutter like this: every swipe gesture there i only one page swipped, and it is being centered in the screen. on the edges of the screen you can see parts of the next and previous items i.e the item is NOT THE SIZE OF THE SCREEN. this requirement is important. i can't set the item to be the size of the screen, also it should have padding between the items. for a better understanding i have a gif attached. Thank you.

https://gfycat.com/soreheartfeltguernseycow

2

There are 2 best solutions below

2
intraector On

You can achieve the goal easily using PageView widget.

0
grisVladko On

Ive found a class carousel_slider which is easily making that functionallity under the hood using PageView as suggested above. For anyone who will need such behaviour as in the gif, see https://pub.dev/packages/carousel_slider