Last active
January 22, 2020 17:55
-
-
Save jacobaraujo7/1eea2f705b769de416f9670c2d1bf3c4 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 MyCounter with ChangeNotifier { | |
| var counter = 0; | |
| increment() { | |
| counter++; | |
| changeNotify(); | |
| } | |
| } | |
| --------------- | |
| //no flutter | |
| Consumer<MyCounter>( | |
| builder: (_, myCounter, child) { | |
| return Text("${myCounter.counter}"); | |
| }, | |
| ), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment