at the moment I am using GridView.builder to create a layout of venues which looks like this: standard gridview layout.
The only problem is, I want the layout to look like this instead (i.e. after every 4 cards arranged in a grid like normal there is to be one full width card. Then the pattern continues as normal). Each card will display the name of a different venue in the database desired grid layout.
Can anyone help me to build this from scratch? I have previously used a library called flutter_staggered_grid_view but the issue I had was that every card had the same name. As such I'd like to build my own (also will come in handy in the future!)
This is the code for using the standard GridView.builder:
if (snapshot.hasData) {
List<Venue?> venuesData = snapshot.data!; // data coming from db
return Padding(
padding: EdgeInsets.only(bottom: 2.h),
child: GridView.builder(
gridDelegate:
const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
),
itemCount: venuesData.length,
itemBuilder: (BuildContext context, int index) {
return Card(
color: Colors.amber,
child: Center(
child: Text(venuesData[index]!.name)),
);
}),
Gridview.builder?