I get the following error "The getter 'length' isn't defined for the type 'Object'" when checking the length of snapshot.data in the itemCount property of a listViewBuilder:
child: StreamBuilder(
stream:_firestoreService?.getProducts(),
builder: (context, snapshot) {
if (!snapshot.hasData) {
return CircularProgressIndicator();
} else {
return ListView.builder(
itemExtent: 80,
itemCount: snapshot.data!.length,
itemBuilder: (context, index) {
The data is coming from firestore