i'm trying to implement horizontal list view in flutter and it's working good but products are too attached to each others, is there a way to put space between them ? thanks in advance
Row(
children: <Widget>[
Expanded(
child: SizedBox(
child: FutureBuilder(
future: httpService.getProducts(),
builder: (BuildContext context, AsyncSnapshot snapshot) {
if (snapshot.data == null) {
return Container(
child: Center(
child: Text('Loading...'),
),
);
}
else if (snapshot.data.length == 0){
return Container(
child: Center(
child: Center(
child: Text('No offers'),
),
),
);
} else {
return ListView.builder(
scrollDirection: Axis.horizontal,
shrinkWrap: true,
itemCount: snapshot.data.length,
itemBuilder: (ctx, i) => (AlAinPdtItem(
title: snapshot.data[i].title,
imgUrl: snapshot.data[i].imgUrl,
price: snapshot.data[i].price,
pdt2: snapshot.data[i])),
);
}
},
)))])
],
),
),