Skip to content

Need help for Drift autoupdate listview with watch() #3012

Answered by simolus3
AMT-Cheif asked this question in Q&A
Discussion options

You must be logged in to vote

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 whether hasData or hasError is true on the snapshot.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@AMT-Cheif
Comment options

@simolus3
Comment options

Answer selected by AMT-Cheif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants