I want to make certain grid items disappear. I use the Visibility widget but in the gridview the item does not disappear from the grid list, what should I do?
GridView.count(
shrinkWrap: true,
crossAxisCount: 2,
mainAxisSpacing: 7.5,
crossAxisSpacing: 7.5,
physics: NeverScrollableScrollPhysics(),
children: [
Visibility(
visible: false,
child: Container(
color: Colors.green,
child: Center(
child: Text('1'),
),
),
),
Visibility(
visible: true,
child: Container(
color: Colors.green,
child: Center(
child: Text('2'),
),
),
),
Visibility(
visible: true,
child: Container(
color: Colors.green,
child: Center(
child: Text('3'),
),
),
),
],
)
what I want

