Home > Software engineering >  GridView overflowing with multiple items added to the grid spot
GridView overflowing with multiple items added to the grid spot

Time:10-04

We have a grid view which is basically 3 columns with some additional in each of the columns but the last elements seem to be getting overflown

GridView.count(
                  crossAxisSpacing: 35,
                  shrinkWrap: true,
                  crossAxisCount: 3,
                  children: List.generate(3, (index) {
                    return Center(
                      child: Column(
                        children: [
                          const CircleAvatar(
                            minRadius: 30,
                          ),
                          const SizedBox(height: 20),
                          Text(
                            'Name',
                            style: Theme.of(context).textTheme.bodyMedium,
                          ),
                          const SizedBox(height: 10),
                          Text(
                            '$index',
                            style: Theme.of(context).textTheme.headline5,
                          ),
                        ],
                      ),
                    );
                  }),
                ),

enter image description here

CodePudding user response:

Wrap the Column wih "SingleChildScrollView"

CodePudding user response:

try to use .

   SizedBox(
height= // your option , 
child : // your Widegt,
)
  • Related