flutter_hooks icon indicating copy to clipboard operation
flutter_hooks copied to clipboard

Add the useOnListenableChange hook

Open gruvw opened this issue 2 years ago • 5 comments
trafficstars

Fixes https://github.com/rrousselGit/flutter_hooks/issues/389

gruvw avatar Oct 23 '23 11:10 gruvw

Could you add tests for this?

rrousselGit avatar Oct 23 '23 11:10 rrousselGit

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.

gruvw avatar Oct 23 '23 11:10 gruvw

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

rrousselGit avatar Oct 23 '23 12:10 rrousselGit

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.

gruvw avatar Oct 23 '23 12:10 gruvw

Don't worry too much. Try what you can and I can guide you. View this as a learning opportunity :)

rrousselGit avatar Oct 23 '23 12:10 rrousselGit

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 :)

rrousselGit avatar Jul 08 '24 05:07 rrousselGit