Skip to content

Instantly share code, notes, and snippets.

@jacobaraujo7
Last active January 22, 2020 17:55
Show Gist options
  • Select an option

  • Save jacobaraujo7/1eea2f705b769de416f9670c2d1bf3c4 to your computer and use it in GitHub Desktop.

Select an option

Save jacobaraujo7/1eea2f705b769de416f9670c2d1bf3c4 to your computer and use it in GitHub Desktop.
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