These are my firebase storage images in its 'photos' folder
我正在尝试将在此存储中使用的图像流式传输到Flutter应用中。任何帮助将不胜感激!
答案 0 :(得分:0)
我会这样:
Stream<QuerySnapshot> qs = Firestore.instance.collection('photos').snapshots();
int length = await qs.length;
答案 1 :(得分:0)
您可以使用StreamBuilder
Stream<QuerySnapshot> qs = Firestore.instance.collection('photos').snapshots();
return StreamBuilder<QuerySnapshot>(
builder:(context,snapshot){
if(snapshot.hasData){
return ListView.Builder(
itemCount:snapshot.data.documents.length,
builder:(context,position)=>YOURVIEW()
);
}else
return CircularProgreesIndicator();
},
stream:qs
);