2021年5月1日星期六

How to display array of image from firestore in listview flutter.?

i want to display array image from firebase but i get this errors:

Illegal scheme character (at character 13) NetworkImage("https://firebasestorage.googleapis.com/v0/b/online-shop-98ea4...

NetworkImage("1", scale: 1.0)

NetworkImage("h", scale: 1.0)

 ListView.builder(              itemBuilder: (context, index) {                for (int i = 0;                    i <                        snapshot.data.documents[index]                            .data()['images']                            .length;                    i++) {                  _listOfImages.add(NetworkImage(                      snapshot.data.documents[index].data()['images'][i]));                }                return Column(                  children: [                    Container(                      child: CarouselSlider(                        options: CarouselOptions(),                        items: _listOfImages                            .map((item) => Container(                                  child: Center(                                      child: Image.network(item.toString(),                                          fit: BoxFit.cover, width: 1000)),                                ))                            .toList(),                      ),                    )                  ],                );                // ignore: dead_code              },              itemCount: _item.length,            );  
https://stackoverflow.com/questions/67352398/how-to-display-array-of-image-from-firestore-in-listview-flutter May 02, 2021 at 10:06AM

没有评论:

发表评论