title: List view cards doesn't work after adding if condition inside in flutter
body: <p>My list view card does not returning all the items stored by a specific user, I want to get all the products saved by the user</p>
  <pre><code> 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() + &quot; Rs&quot;),
                      trailing: Icon(Icons.more_vert),
                    ),
                  );
                } else {
                  return null;
                }
              })
          : Center(child: CircularProgressIndicator()));
  </code></pre>