In this code, I want to get all document IDs from the stories collection instead of giving the document id manually in the future builder future and show it in the CachedNetworkImage in the way that if isAddStory is true show the current user story image from storyUrl field from the userStories sub-collection.
And if isAddStory is false show storyUrl of all the other users from the userStories sub-collection.
Please can anyone help with this.
Asked
Active
Viewed 39 times
0

Alex Mamo
- 130,605
- 17
- 163
- 193

Gautam Govind
- 19
- 3
-
1Please don't post screenshots of your code, or other textual content. Instead post the actual text, and use the formatting tools of Stack Overflow to mark it up. Also see: [Why not upload images of code/errors when asking a question?](https://meta.stackoverflow.com/questions/285551/why-not-upload-images-of-code-errors-when-asking-a-question) – Frank van Puffelen Jun 29 '23 at 09:54
1 Answers
0
There is no way you can read those IDs because those two documents don't exist. How did I notice that the documents don't exist? Simply I saw in your screenshot that the document IDs are written in italics. If you need to read those IDs, then you should add at least a field in each document. The field might even hold a null value.

Alex Mamo
- 130,605
- 17
- 163
- 193
-
-
What after I add a field. How to get all the document IDs from the stories collection – Gautam Govind Jun 29 '23 at 08:18
-
After you add a field, you'll be able to read the document IDs in your application code. – Alex Mamo Jun 29 '23 at 08:18
-
Hey Gautam. Did my answer help? Can I help you with other information? – Alex Mamo Jul 10 '23 at 05:34