-
-
Notifications
You must be signed in to change notification settings - Fork 310
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
feat: Adds custom equals
for creating observables.
#907
Conversation
Codecov Report
@@ Coverage Diff @@
## master #907 +/- ##
=======================================
Coverage 98.98% 98.99%
=======================================
Files 56 56
Lines 1980 1987 +7
=======================================
+ Hits 1960 1967 +7
Misses 20 20
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
|
equals
for creating observables.
Hey there @pavanpodila & @fzyzcjy is there any way of knowing when this pr will be reviewed/released? thanks a lot! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Btw, I love https://pub.dev/packages/json_serializable's approach when it comes to defining a custom function. For example,
@JsonKey(fromJson: myMethod)
whatever_thing
Sth myMethod(Sth sth) { ... }
Then no need to provide a string
Any updates on this? |
6b7196c
to
b23fdff
Compare
@fzyzcjy Yeah, I like the approach of bool customEquals(String? oldValue, String? newValue) => oldValue != newValue;
abstract class _TestStore with Store {
_TestStore();
@MakeObservable(equals: customEquals)
String custom = 'stuff';
@alwaysNotify
String always = 'stuff';
} |
@all-contributors please add @fzyzcjy for review |
I've put up a pull request to add @fzyzcjy! 🎉 |
Allows a reaction to be fired even if the value hasn't changed.
Adds custom equals for creating observables.
#844
fix #903
Pull Request Checklist
pubspec.yaml
is updated.major
/minor
/patch
/patch-count
, depending on the complexity of changemelo run set_version
command from the root directory