i want to make a layout like image below, i want a layout that be wrap not grid(i don’t want all of my elements be same width), but i want the elements stretch and take whole width, how can i achieve something like this in flutter
this doesn’t do what i want
class CategoryList extends StatelessWidget {
const CategoryList({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text('Wrap Example')),
body: Padding(
padding: const EdgeInsets.all(8.0),
child: Wrap(
spacing: 8.0, // Horizontal space between items
runSpacing: 8.0, // Vertical space between lines
children: categories.map((label) => CategoryCard(label)).toList(),
),
),
);
}
}