Skip to content

Instantly share code, notes, and snippets.

@isacjunior
Created September 9, 2019 19:04
Show Gist options
  • Save isacjunior/c507e1e1ebb1e901bedc4271b5973588 to your computer and use it in GitHub Desktop.
Save isacjunior/c507e1e1ebb1e901bedc4271b5973588 to your computer and use it in GitHub Desktop.
class MyCount extends StatefulWidget {
@override
_MyCountState createState() => _MyCountState();
}
class _MyCountState extends State<MyCount> {
int _counter = 0;
void _incrementCounter() {
setState(() {
_counter++;
});
}
@override
Widget build(BuildContext context) {
// ...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment