Last active
February 19, 2020 13:07
-
-
Save Zfinix/3c7658395bd404625884dca979ad4e2b 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 Home extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| var controller = Provider.of<HomeController>(context); | |
| return Scaffold( | |
| body: Column( | |
| mainAxisAlignment: MainAxisAlignment.center, | |
| children: <Widget>[ | |
| Text('Current Value: ${controller.counter}'), | |
| SizedBox(height:50), | |
| RaisedButton( | |
| onPressed:() => controller.increment, | |
| child: Text('Increment') | |
| ) | |
| ], | |
| ), | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment