这是我正在使用getDocumenent()
访问Future<QuerySnapshot>
Future<QuerySnapshot> fetchOrderSummery() async {
var user = await FirebaseAuth.instance.currentUser();
return firestoreInstance
.collection("placeOrder")
.document(user.uid)
.collection("subPlaceOrder")
.getDocuments();
}
这是我的FutureBuilder
Future<QuerySnapshot> order = state.orderSummery; //Using bloc so data return by state.orderSummery
return FutureBuilder(
future: order,
builder: (context, snapshot) {
return Column(
children: <Widget>[
Text('${order.data.documents}'),
],
);
},
);
答案 0 :(得分:0)
1。声明一个变量 2.执行期间分配 3.在将来使用变量
while($row_feed = $feed->fetch_object()) { }