Моя карточка просмотра списка не возвращает все элементы, сохраненные определенным c пользователем, я хочу получить все продукты, сохраненные пользователем
body: (products != null)
? ListView.builder(
itemCount: products.length,
itemBuilder: (context, index) {
if (products[index].ownerId == user.uid) {
return Card(
child: ListTile(
leading: Image.asset('graphics/broccoli.png'),
title: Text(products[index].name),
subtitle:
Text(products[index].price.toString() + " Rs"),
trailing: Icon(Icons.more_vert),
),
);
} else {
return null;
}
})
: Center(child: CircularProgressIndicator()));