Im trying to get data from firebase in flutter. Theres my video collection where every videos has an array and I want get that array and save it in a list and then loop over it. But how can I do this?Here is my code at the moment
getusers() async {
var firestore = FirebaseFirestore.instance;
List listofarrays = [];
QuerySnapshot qn= await firestore
.collection('videos')
.get()
.then((QuerySnapshot querySnapshot) {
querySnapshot.docs.forEach((doc) {
setState(() {
});
So what I want is getting every array of each video with names Hashtagsforallvideos and then add it into the list listofarrays. heres my database
Im trying to get data from firebase in flutter. Theres my video collection where every videos has an array and I want get that array and save it in a list and then loop over it. But how can I do this?Here is my code at the moment
getusers() async {
var firestore = FirebaseFirestore.instance;
List listofarrays = [];
QuerySnapshot qn= await firestore
.collection('videos')
.get()
.then((QuerySnapshot querySnapshot) {
querySnapshot.docs.forEach((doc) {
setState(() {
});
So what I want is getting every array of each video with names Hashtagsforallvideos and then add it into the list listofarrays. heres my database
Im trying to get data from firebase in flutter. Theres my video collection where every videos has an array and I want get that array and save it in a list and then loop over it. But how can I do this?Here is my code at the moment
getusers() async {
var firestore = FirebaseFirestore.instance;
List listofarrays = [];
QuerySnapshot qn= await firestore
.collection('videos')
.get()
.then((QuerySnapshot querySnapshot) {
querySnapshot.docs.forEach((doc) {
setState(() {
});
So what I want is getting every array of each video with names Hashtagsforallvideos and then add it into the list listofarrays. heres my database
Im trying to get data from firebase in flutter. Theres my video collection where every videos has an array and I want get that array and save it in a list and then loop over it. But how can I do this?Here is my code at the moment
getusers() async {
var firestore = FirebaseFirestore.instance;
List listofarrays = [];
QuerySnapshot qn= await firestore
.collection('videos')
.get()
.then((QuerySnapshot querySnapshot) {
querySnapshot.docs.forEach((doc) {
setState(() {
});
So what I want is getting every array of each video with names Hashtagsforallvideos and then add it into the list listofarrays. heres my database
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.