Last active
March 12, 2020 04:30
-
-
Save shyndman/4541ffc0e8ec013dd21a8b504d2eef05 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class observable { | |
| const observable(this.comparator); | |
| final bool Function(Object a, Object b) comparator; | |
| } | |
| bool standardEquality(Object a, Object b) => a == b; | |
| class Foo { | |
| @observable(standardEquality) | |
| bool flag; | |
| @observable(Foo.equals) | |
| Foo child; | |
| static bool equals(Object a, Object b) => a == b; | |
| } | |
| void main() { | |
| final foo = Foo(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment