-
I'm new to flutter, I'm building an app that should show a list of itmes (Articoli), and from other pages I can add edit or remove them. It worked, but when I made change I need to restart the app to view the changes in the list, so I looked in the documentation and I found watch(), I tryed for the last 3 day to make it work, but I was not able, now it show the circularindicator forever, and no items in the list. here is my code https://pastebin.com/cwisd4ed anyone can help me to find my mistakes? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I think |
Beta Was this translation helpful? Give feedback.
I think
ConnectionState.done
is terminal and signals that the stream has completed, with no subsequent updates to be expected. As query streams don't end, you'll never reach that state.Instead, you should check for
ConnectionState.active
or just show the state depending on whetherhasData
orhasError
is true on the snapshot.