0

I am trying to put FirestoreListView inside ListView but i recieve some errors.

My code sample:

ListView(
    children: [
      // Some stuffs here
      FirestoreListView<Map<String, dynamic>>(
          shrinkWrap: true,
          physics: NeverScrollableScrollPhysics(),
          query: usersQuery,
          itemBuilder: (context, snapshot) {
        Map<String, dynamic> user = snapshot.data();
    
        return Text('User name is ${user['name']}');
        },
      )
  ],
  ),

The error I got:

The following assertion was thrown during performLayout():
RenderCustomMultiChildLayoutBox object was given an infinite size during layout.

After using FirestoreListView inside SizedBox with height it does not work as i want.

Kai Tera
  • 59
  • 2
  • 9

1 Answers1

0

ListView and FirestoreListView does the same job for you., you can remove the over ListView and just use FirestoreListView, the itemBuilder function will do the required job for you

rsenthilk
  • 95
  • 1
  • 7