1 year ago
#326363
Ayme_99
Flutter Carousel, put side items behind the center card
I want to know how to put the carousel items behind the center item, then when it slides there will be no spaces between items but it will stay behind
And I want somethig like this:
This is my code:
CarouselSlider(
options: CarouselOptions(
height: Sizes.width,
enableInfiniteScroll: true,
aspectRatio: 2.0,
enlargeCenterPage: true,
viewportFraction: 0.8,
onPageChanged: (index, reason) =>
setState(() => currentCard = index),
),
items: hardcore.map((i) {
return Builder(builder: (BuildContext context) {
return Container(
width: MediaQuery.of(context).size.width,
margin: EdgeInsets.symmetric(horizontal: 0),
child: ClipRRect(
borderRadius: BorderRadius.circular(20),
child: Image.asset(i, fit: BoxFit.cover)));
});
}).toList()),
flutter
carousel
flutter-widget
flutter-plugin
0 Answers
Your Answer