Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add useStreamListener hook #372

Closed
wants to merge 1 commit into from

Conversation

jezsung
Copy link
Contributor

@jezsung jezsung commented Jul 12, 2023

Adds a new hook useStreamListener that allows you to subscribe to a Stream and register callback handlers such as onData, onError, and onDone.

@codecov
Copy link

codecov bot commented Jul 12, 2023

Codecov Report

Patch coverage: 96.77% and project coverage change: -0.12 ⚠️

Comparison is base (4f70845) 99.87% compared to head (495bea0) 99.75%.

❗ Current head 495bea0 differs from pull request most recent head b598579. Consider uploading reports for the commit b598579 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #372      +/-   ##
==========================================
- Coverage   99.87%   99.75%   -0.12%     
==========================================
  Files          18       18              
  Lines         775      806      +31     
==========================================
+ Hits          774      804      +30     
- Misses          1        2       +1     
Impacted Files Coverage Δ
packages/flutter_hooks/lib/src/async.dart 99.32% <96.77%> (-0.68%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jezsung
Copy link
Contributor Author

jezsung commented Jul 15, 2023

Please take a look at the #373 first. I added a new hook useStreamSubscription which does the same thing but more flexible than the useStreamListener hook. I think this PR could be closed if the other one is merged.

@rrousselGit
Copy link
Owner

Closing this since the other PR was merged :)

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