Key? key,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return ListView.builder(
itemCount: Entity.listOfDescriptions.length,
itemBuilder: (BuildContext context, int index) {
return Center(
child: Wrap(
spacing: 20,
runSpacing: 20,
children: [
WhiteSquare(
description: Entity.listOfDescriptions[index],
url: Entity.listOfUrls[index],
name: Entity.listOfNames[index],
text: Entity.listOfTexts[index],
svgPicture: Entity.listOfImageAssets[index]
),
],
),
);
});
}
}
Тут у тебя нет бокса
CardWidget между 2 sizedBox был в Column?
class CardWidget extends StatelessWidget { const CardWidget({ Key? key, }) : super(key: key); @override Widget build(BuildContext context) { return GridView.builder( physics: const BouncingScrollPhysics(), gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( crossAxisCount: 2, ), itemCount: Entity.listOfDescriptions.length, itemBuilder: (BuildContext context, int index) { return Center( child: Wrap( children: [ const SizedBox(height: 20), WhiteSquare( description: Entity.listOfDescriptions[index], url: Entity.listOfUrls[index], name: Entity.listOfNames[index], text: Entity.listOfTexts[index], svgPicture: Entity.listOfImageAssets[index], ), const SizedBox(height: 20), ]), ); }, ); } }
Обсуждают сегодня