I am building a social media app as a way to learn the basics of Flutter. I have made a way to upload a post, and it uploads data into my Firebase Realtime database like this:
-Posts
postid
imageurl
uid
uemail
uname
postid
etc
How should I go about loading this data into a ListView and displaying the username and the image for each post? I have only done this with a recyclerview in Android in the past.
2
Answers
If anybody else is trying to figure this out, I ended up following this tutorial, and it was very helpful! It uses a StreamBuilder to load data into a list, and it seems like a much more simple way to accomplish this than some of the other methods I looked into.
You can traverse the post from the firebase store.
From the above code, you can get posts from firebase database