Reputation: 103
I want to make something like in this picture
or this
but I want to make it swipe automatically using Flutter
I don't know if there's a widget that can help me or any package that implement it.
Upvotes: 1
Views: 1197
Reputation: 14885
Try below code Without any package scroll list left to right or vice-versa or you can used carousel_slider
package or flutter_image_slideshow
package or card_swiper
ListView.builder(
shrinkWrap: true,
scrollDirection: Axis.horizontal,
itemCount: 10,
itemBuilder: (context, index) {
return Container(
margin: const EdgeInsets.all(10),
width: 200,
height: 200,
child: Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),
elevation: 5,
child: Center(
child: Text(
'Card $index',
style: const TextStyle(
fontSize: 20,
color: Colors.black,
fontWeight: FontWeight.bold,
),
),
),
),
);
},
),
Upvotes: 1
Reputation: 56
You can check the carousel_slider package in pub.dev. It does the scrolling automatically
Upvotes: 1