Skip to content

Only watch changes for specific columns #2727

Answered by simolus3
hiroshihorie asked this question in Q&A
Discussion options

You must be logged in to vote

Am I doing something wrong or is this intended design ?

This is the indented design, often we have no way of knowing which exact columns were updated in which rows. So streams are designed to not miss any updates, but they can fire more often than strictly necessary.
If the row type you're mapping to (you can also use a Dart record) implements equals, you can use .distinct(const ListEquality().equals) on the stream to avoid notifying listeners when nothing has changed.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by hiroshihorie
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