Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class AppThreePlusThree extends StatelessWidget {
- @override
- Widget build(BuildContext context) {
- var game = new Game();
- var counter = 265;
- return new GameRedux(
- counter: counter,
- child: new MaterialApp(
- title: '3 + 3',
- theme: new ThemeData(
- primarySwatch: Colors.blue,
- ),
- home: new Scaffold(
- ...
- ...
- new Text('$counter'),
- ...
- class AppThreePlusThree extends StatefulWidget {
- _AppThreePlusThreeState createState() => _AppThreePlusThreeState ();
- }
- class _AppThreePlusThreeState extends State<AppThreePlusThree> {
- var counter = 265;
- @override
- Widget build(BuildContext context) {
- var game = new Game();
- setState(() => counter = 265);//I seriously doesnt have any idea how you are going to change or update your counter variable. something like this should work
- return new GameRedux(
- counter: counter,
- child: new MaterialApp(
- title: '3 + 3',
- theme: new ThemeData(
- primarySwatch: Colors.blue,
- ),
- home: new Scaffold(
- ...
- ...
- new Text('$counter'),
- ...
Add Comment
Please, Sign In to add comment