Last active
March 12, 2020 04:30
-
-
Save shyndman/4541ffc0e8ec013dd21a8b504d2eef05 to your computer and use it in GitHub Desktop.
Revisions
-
Scott Hyndman revised this gist
Mar 12, 2020 . 1 changed file with 9 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -8,4 +8,13 @@ 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(); } -
Scott Hyndman created this gist
Mar 12, 2020 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ 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; }