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

distinct in debounce duration #84

Closed
ColorFuzzy opened this issue Sep 30, 2018 · 2 comments
Closed

distinct in debounce duration #84

ColorFuzzy opened this issue Sep 30, 2018 · 2 comments

Comments

@ColorFuzzy
Copy link

ColorFuzzy commented Sep 30, 2018

Is there a way to distinct message in a limit debounce duration.

For example:
message flow: a(200ms) -> a(300ms) -> a(800ms) => if distinct , only one message will be delivered;

if distinct in a limit debounce duration, like 600ms => two message will be delivered, only the middle a(300ms) will not deliver.

  1. if distinct message in a limit debounce duration
  2. => every different message will be delivered
  3. => if two same message triggered in a limit debounce, only one will be delivered
@brianegan
Copy link
Owner

Not out of the box -- for that use-case, you could use a StreamBuilder + grab the store's Change stream from the Widget heirarchy via StoreProvider.of<AppState>(context).onChange. You could then transform that onChange stream in any way ya need!

@ColorFuzzy
Copy link
Author

Not out of the box -- for that use-case, you could use a StreamBuilder + grab the store's Change stream from the Widget heirarchy via StoreProvider.of<AppState>(context).onChange. You could then transform that onChange stream in any way ya need!

As there is no out of the box solution, I'll keep the last message and timestamp.

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

No branches or pull requests

2 participants