@@ -10,7 +10,7 @@ import '/app/controllers/home_controller.dart';
10
10
class HomePage extends NyStatefulWidget <HomeController > {
11
11
static const path = '/home' ;
12
12
13
- HomePage () : super (path, child: _HomePageState ());
13
+ HomePage ({ super .key} ) : super (path, child: _HomePageState ());
14
14
}
15
15
16
16
class _HomePageState extends NyState <HomePage > {
@@ -47,7 +47,7 @@ class _HomePageState extends NyState<HomePage> {
47
47
actions: [
48
48
IconButton (
49
49
onPressed: widget.controller.showAbout,
50
- icon: Icon (Icons .info_outline),
50
+ icon: const Icon (Icons .info_outline),
51
51
),
52
52
],
53
53
),
@@ -57,26 +57,26 @@ class _HomePageState extends NyState<HomePage> {
57
57
crossAxisAlignment: CrossAxisAlignment .center,
58
58
mainAxisAlignment: MainAxisAlignment .center,
59
59
children: [
60
- Logo (),
60
+ const Logo (),
61
61
Text (
62
62
getEnv ("APP_NAME" ),
63
63
).displayMedium (context),
64
- Text ("Micro-framework for Flutter" , textAlign: TextAlign .center)
64
+ const Text ("Micro-framework for Flutter" , textAlign: TextAlign .center)
65
65
.titleMedium (context)
66
66
.setColor (context, (color) => color.primaryAccent),
67
- Text (
67
+ const Text (
68
68
"Build something amazing 💡" ,
69
69
).bodyMedium (context).alignCenter (),
70
70
Column (
71
71
crossAxisAlignment: CrossAxisAlignment .center,
72
72
mainAxisAlignment: MainAxisAlignment .start,
73
73
children: < Widget > [
74
- Divider (),
74
+ const Divider (),
75
75
Container (
76
76
height: 250 ,
77
77
width: double .infinity,
78
- margin: EdgeInsets .symmetric (horizontal: 16 , vertical: 16 ),
79
- padding: EdgeInsets .symmetric (horizontal: 16 , vertical: 16 ),
78
+ margin: const EdgeInsets .symmetric (horizontal: 16 , vertical: 16 ),
79
+ padding: const EdgeInsets .symmetric (horizontal: 16 , vertical: 16 ),
80
80
decoration: BoxDecoration (
81
81
color: ThemeColor .get (context).surfaceBackground,
82
82
borderRadius: BorderRadius .circular (8 ),
@@ -85,7 +85,7 @@ class _HomePageState extends NyState<HomePage> {
85
85
color: Colors .grey.withOpacity (0.1 ),
86
86
spreadRadius: 1 ,
87
87
blurRadius: 9 ,
88
- offset: Offset (0 , 3 ),
88
+ offset: const Offset (0 , 3 ),
89
89
),
90
90
]),
91
91
child: Center (
@@ -95,38 +95,38 @@ class _HomePageState extends NyState<HomePage> {
95
95
children:
96
96
ListTile .divideTiles (context: context, tiles: [
97
97
MaterialButton (
98
+ onPressed: widget.controller.onTapDocumentation,
98
99
child: Text (
99
100
"documentation" .tr ().capitalize (),
100
101
).bodyLarge (context).setColor (
101
102
context, (color) => color.surfaceContent),
102
- onPressed: widget.controller.onTapDocumentation,
103
103
),
104
104
MaterialButton (
105
- child: Text (
105
+ onPressed: widget.controller.onTapGithub,
106
+ child: const Text (
106
107
"GitHub" ,
107
108
).bodyLarge (context).setColor (
108
109
context, (color) => color.surfaceContent),
109
- onPressed: widget.controller.onTapGithub,
110
110
),
111
111
MaterialButton (
112
+ onPressed: widget.controller.onTapChangeLog,
112
113
child: Text (
113
114
"changelog" .tr ().capitalize (),
114
115
).bodyLarge (context).setColor (
115
116
context, (color) => color.surfaceContent),
116
- onPressed: widget.controller.onTapChangeLog,
117
117
),
118
118
MaterialButton (
119
+ onPressed: widget.controller.onTapYouTube,
119
120
child: Text (
120
121
"YouTube Channel" .tr ().capitalize (),
121
122
).bodyLarge (context).setColor (
122
123
context, (color) => color.surfaceContent),
123
- onPressed: widget.controller.onTapYouTube,
124
124
),
125
125
]).toList (),
126
126
),
127
127
),
128
128
),
129
- Text (
129
+ const Text (
130
130
"Framework Version: $nyloVersion " ,
131
131
)
132
132
.bodyMedium (context)
0 commit comments