@@ -45,48 +45,58 @@ class _MainActivityState extends State<MainActivity> {
45
45
return Container (
46
46
child: Stack (
47
47
children: < Widget > [
48
- Container (
49
- color: _theme.primaryColor,
50
- child: Center (
51
- child: Column (
52
- children: < Widget > [
53
- MaterialButton (
54
- onPressed: () => _backViewOnClick (0 ),
55
- child:
56
- Text ("Captain America" , style: TextStyle (fontSize: 30 )),
57
- ),
58
- MaterialButton (
59
- onPressed: () => _backViewOnClick (1 ),
60
- child: Text (
61
- "Iron Man" ,
62
- style: TextStyle (fontSize: 30 ),
63
- ),
64
- ),
65
- MaterialButton (
66
- onPressed: () => _backViewOnClick (2 ),
67
- child: Text (
68
- "Thor" ,
69
- style: TextStyle (fontSize: 30 ),
70
- ),
71
- ),
72
- MaterialButton (
73
- onPressed: () => _backViewOnClick (3 ),
74
- child: Text (
75
- "Hulk" ,
76
- style: TextStyle (fontSize: 30 ),
77
- ),
78
- )
79
- ],
80
- ),
81
- ),
82
- ),
48
+ _backView (_theme),
83
49
SlideTransition (
84
50
position: _getSlideAnimation (constraint), child: _frontView ())
85
51
],
86
52
),
87
53
);
88
54
}
89
55
56
+ Widget _backView (ThemeData theme){
57
+ return Scaffold (
58
+ appBar: AppBar (
59
+ backgroundColor: theme.backgroundColor,
60
+ elevation: 0.0 ,
61
+ ),
62
+ backgroundColor: theme.backgroundColor,
63
+ body: Container (
64
+ child: Center (
65
+ child: Column (
66
+ children: < Widget > [
67
+ MaterialButton (
68
+ onPressed: () => _backViewOnClick (0 ),
69
+ child:
70
+ Text ("Captain America" , style: TextStyle (fontSize: 30 )),
71
+ ),
72
+ MaterialButton (
73
+ onPressed: () => _backViewOnClick (1 ),
74
+ child: Text (
75
+ "Iron Man" ,
76
+ style: TextStyle (fontSize: 30 ),
77
+ ),
78
+ ),
79
+ MaterialButton (
80
+ onPressed: () => _backViewOnClick (2 ),
81
+ child: Text (
82
+ "Thor" ,
83
+ style: TextStyle (fontSize: 30 ),
84
+ ),
85
+ ),
86
+ MaterialButton (
87
+ onPressed: () => _backViewOnClick (3 ),
88
+ child: Text (
89
+ "Hulk" ,
90
+ style: TextStyle (fontSize: 30 ),
91
+ ),
92
+ )
93
+ ],
94
+ ),
95
+ ),
96
+ ),
97
+ );
98
+ }
99
+
90
100
Widget _frontView () {
91
101
return Scaffold (
92
102
appBar: AppBar (
0 commit comments