flutter_hooks
flutter_hooks copied to clipboard
Add the useOnListenableChange hook
Fixes https://github.com/rrousselGit/flutter_hooks/issues/389
Could you add tests for this?
tell me if the class syntax is correct, I am not sure.
After reviewing the existing test cases briefly, it is evident that I lack the necessary skills to create these tests. Therefore, I am handing over the responsibility of writing tests for this hook to someone who is willing and capable.
I'm sure you'd be able to write those tests :)
You could copy-paste the useOnStreamChange as a very good starting point. It's pretty much the same thing we want here
Ok, thank you for the comments, I did the necessary updates. Tell me if the code is good now or if there are other issues.
I might tackle the testing if you think it is within my reach, but certainly not this week.
However, there are a lot of different things I am not familiar with in test/use_on_stream_change_test.dart.
Don't worry too much. Try what you can and I can guide you. View this as a learning opportunity :)
This appears to be stale, so I'll close this.
Feel free to open a new PR if you're willing to add tests for it :)