Add unique Item at the end of a list

Viewed 22

I want to display a unique Item at the end of my ListView.builder using Flutter

this is my code rn

                    StreamBuilder(
                      stream: items,
                      builder: (BuildContext context,
                          AsyncSnapshot<QuerySnapshot> snapshot) {
                        if (snapshot.hasError) {
                          return Text('Something went wrong :(');
                        }
                        if (snapshot.connectionState == ConnectionState.waiting) {
                          return Center(child: CircularProgressIndicator());
                        }

                        final data = snapshot.requireData;

                        return ListView.builder(
                          itemCount: data.size,
                          itemBuilder: (BuildContext context, int index) {
                          
                            return Item(
                                data.docs[index]['name'], data.docs[index]['weight']);
                          },
                        );
                      },
                    ),```
0 Answers
Related