I'm need implement a ListView on Flutter, and i'm passing snapshot.data.length as a parameter for itemCount:
return ListView.builder(
itemCount: snapshot.data.length,
itemBuilder: (context, index) {
return ListTile(
title: Text(
snapshot.data[index].data["Identificacao"],...
Then i got an error:
I/flutter ( 4647): Class 'List<DocumentSnapshot>' has no instance getter 'length'.
I/flutter ( 4647): Receiver: Instance(length:1) of '_GrowableList'
I/flutter ( 4647): Tried calling: length
But these sintax are used in many tutorials i have seen. I had tried use:
snapshot.data.documents.length;
but the result is the same. Please help me!