Skip to content

Conversation

simolus3
Copy link
Contributor

Some pages in the demo apps create a stream subscription and use setState() when receiving new snapshots to render content. This refactors most of these usages to use Flutter's StreamBuilder widget. Using stream builders makes it impossible to leak resources (the widget will stop listening to the stream when removed from the tree) and requires much less boilerplate code.

@simolus3 simolus3 requested a review from stevensJourney March 21, 2025 15:12
Copy link
Contributor

@rkistner rkistner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is much cleaner!

@simolus3 simolus3 merged commit 263dd47 into main Mar 24, 2025
5 checks passed
@simolus3 simolus3 deleted the demo-state-refactoring branch March 24, 2025 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants