flutter_carousel_slider
flutter_carousel_slider copied to clipboard
Too much left & right space when enableInfiniteScroll=false & viewportFraction<1
I couldn't find any options to reduce space (show as red color) on left & right of carousel when enableInfiniteScroll = false, viewportFraction<1. It's too much space.
CarouselSlider(
options: CarouselOptions(
enableInfiniteScroll: false,
viewportFraction: 0.4,
disableCenter: true,
),
items: [1, 2, 3, 4].map((i) =>
Container(
width: MediaQuery.of(context).size.width * 0.3,
margin: EdgeInsets.only(right: 15),
color: Colors.green,
child: Text(i.toString()),
),
).toList(),
)

@PoundXI Hi, did you found any solution?
@PoundXI Hi, did you found any solution?
No. I'm not found any solution.
I have the same problem
Could this be solvable through the newly exposed padEnds on PageView? https://github.com/flutter/flutter/issues/78492