-1
My gridView.Builder has a blank space between the inexplicable lines, I’ve reviewed all the code and there is no widget with this margin or padding.
Is Gridview coming with auto space? If so, how do I remove it?
My gridView:
listViewBuilderCategoriasFirebase(){
return StreamBuilder(
stream: FirebaseFirestore.instance
.collection("InfoApp")
.doc("DadosApp")
.collection("categorias")
.orderBy("posicao", descending: false)
.snapshots(),
builder: (context, snapshot){
switch(snapshot.connectionState) {
case ConnectionState.none:
case ConnectionState.waiting:
//return carregandoDados;
break;
case ConnectionState.active:
case ConnectionState.done:
QuerySnapshot querySnapshot = snapshot.data;
if(querySnapshot.docs.length == 0){
return Container(
padding: EdgeInsets.all(25),
child: Center(
child: Text("Nenhuma categoria disponível!",
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold
),),
),
);
}
return GridView.builder(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
mainAxisSpacing: 0,
crossAxisSpacing: 0,
),
itemCount: querySnapshot.docs.length,
padding: EdgeInsets.all(0),
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (context, indice){
return GestureDetector(
onTap: (){
//push(context, w);
print("");
},
child: Text("a")
);
},
);
}
return Container();
},
);
}