@@ -19,12 +19,12 @@ class _HomePageState extends NyPage<HomePage> {
19
19
20
20
@override
21
21
get init => () async {
22
- /// Uncomment the code below to fetch the number of stars for the Nylo repository
23
- // Map<String, dynamic>? githubResponse = await api<ApiService>(
24
- // (request) => request.githubInfo(),
25
- // );
26
- // _stars = githubResponse?["stargazers_count"];
27
- };
22
+ /// Uncomment the code below to fetch the number of stars for the Nylo repository
23
+ // Map<String, dynamic>? githubResponse = await api<ApiService>(
24
+ // (request) => request.githubInfo(),
25
+ // );
26
+ // _stars = githubResponse?["stargazers_count"];
27
+ };
28
28
29
29
/// Define the Loading style for the page.
30
30
/// Options: LoadingStyle.normal(), LoadingStyle.skeletonizer(), LoadingStyle.none()
@@ -49,125 +49,125 @@ class _HomePageState extends NyPage<HomePage> {
49
49
),
50
50
body: SafeAreaWidget (
51
51
child: Column (
52
+ crossAxisAlignment: CrossAxisAlignment .center,
53
+ mainAxisAlignment: MainAxisAlignment .center,
54
+ children: [
55
+ const Logo (),
56
+ Text (
57
+ getEnv ("APP_NAME" ),
58
+ ).displayMedium (color: context.color.content),
59
+ const Text ("Micro-framework for Flutter" , textAlign: TextAlign .center)
60
+ .titleMedium (color: context.color.primaryAccent),
61
+ const Text ("Build something amazing 💡" , textAlign: TextAlign .center)
62
+ .bodyMedium ()
63
+ .alignCenter (),
64
+ Column (
52
65
crossAxisAlignment: CrossAxisAlignment .center,
53
- mainAxisAlignment: MainAxisAlignment .center,
54
- children: [
55
- const Logo (),
56
- Text (
57
- getEnv ("APP_NAME" ),
58
- ).displayMedium (color: context.color.content),
59
- const Text ("Micro-framework for Flutter" , textAlign: TextAlign .center)
60
- .titleMedium (color: context.color.primaryAccent),
61
- const Text ("Build something amazing 💡" , textAlign: TextAlign .center)
62
- .bodyMedium ()
63
- .alignCenter (),
64
- Column (
65
- crossAxisAlignment: CrossAxisAlignment .center,
66
- mainAxisAlignment: MainAxisAlignment .start,
67
- children: < Widget > [
68
- const Divider (),
69
- Container (
70
- height: 250 ,
71
- width: double .infinity,
72
- margin:
66
+ mainAxisAlignment: MainAxisAlignment .start,
67
+ children: < Widget > [
68
+ const Divider (),
69
+ Container (
70
+ height: 250 ,
71
+ width: double .infinity,
72
+ margin:
73
73
const EdgeInsets .symmetric (horizontal: 16 , vertical: 16 ),
74
- padding:
74
+ padding:
75
75
const EdgeInsets .symmetric (horizontal: 16 , vertical: 16 ),
76
- decoration: BoxDecoration (
77
- color: context.color.surfaceBackground,
78
- borderRadius: BorderRadius .circular (8 ),
79
- boxShadow: [
80
- BoxShadow (
81
- color: Colors .grey.withAlpha ((255.0 * 0.1 ).round ()),
82
- spreadRadius: 1 ,
83
- blurRadius: 9 ,
84
- offset: const Offset (0 , 3 ),
85
- ),
86
- ]),
87
- child: Center (
88
- child: ListView (
89
- padding: EdgeInsets .zero,
90
- shrinkWrap: true ,
91
- children: ListTile .divideTiles (context: context, tiles: [
92
- if (Nylo .containsRoute ("/landing" ))
93
- ListTile (
94
- leading: FaIcon (FontAwesomeIcons .rocket),
95
- title: Text (
96
- "Start building" ,
97
- ).bodyLarge (color: context.color.surfaceContent),
98
- subtitle: Text (
99
- "Your project is ready" ,
100
- ).bodySmall (color: context.color.surfaceContent),
101
- trailing: const Icon (Icons .chevron_right),
102
- onTap: () => routeTo ("/landing" ),
103
- ),
104
- ListTile (
105
- leading: FaIcon (FontAwesomeIcons .readme),
106
- title: Text (
107
- "Documentation" ,
108
- ).bodyLarge (color: context.color.surfaceContent),
109
- subtitle: Text (
110
- "Master the framework" ,
111
- ).bodySmall (color: context.color.surfaceContent),
112
- trailing: const Icon (Icons .chevron_right),
113
- onTap: widget.controller.onTapDocumentation,
114
- ),
115
- ListTile (
116
- leading: FaIcon (FontAwesomeIcons .github),
117
- title: Text (
118
- "Github" ,
119
- ).bodyLarge (color: context.color.surfaceContent),
120
- subtitle: Text (
121
- _stars == null ? "Source code" : "$_stars Stars" ,
122
- ).bodySmall (color: context.color.surfaceContent),
123
- trailing: const Icon (Icons .chevron_right),
124
- onTap: widget.controller.onTapGithub,
125
- ),
126
- ListTile (
127
- leading: FaIcon (FontAwesomeIcons .newspaper),
128
- title: Text (
129
- "Updates" ,
130
- ).bodyLarge (color: context.color.surfaceContent),
131
- subtitle: Text (
132
- "View the changelog" ,
133
- ).bodySmall (color: context.color.surfaceContent),
134
- trailing: const Icon (Icons .chevron_right),
135
- onTap: widget.controller.onTapChangeLog,
136
- ),
137
- ListTile (
138
- leading: FaIcon (FontAwesomeIcons .youtube),
139
- title: Text (
140
- "YouTube Channel" ,
141
- ).bodyLarge (color: context.color.surfaceContent),
142
- subtitle: Text (
143
- "Tutorial videos" ,
144
- ).bodySmall (color: context.color.surfaceContent),
145
- trailing: const Icon (Icons .chevron_right),
146
- onTap: widget.controller.onTapYouTube,
147
- ),
148
- ListTile (
149
- leading: FaIcon (FontAwesomeIcons .xTwitter),
150
- title: Text (
151
- "Follow us on X" ,
152
- ).bodyLarge (color: context.color.surfaceContent),
153
- subtitle: Text (
154
- "Stay updated" ,
155
- ).bodySmall (color: context.color.surfaceContent),
156
- trailing: const Icon (Icons .chevron_right),
157
- onTap: widget.controller.onTapX,
158
- ),
159
- ]).toList (),
76
+ decoration: BoxDecoration (
77
+ color: context.color.surfaceBackground,
78
+ borderRadius: BorderRadius .circular (8 ),
79
+ boxShadow: [
80
+ BoxShadow (
81
+ color: Colors .grey.withAlpha ((255.0 * 0.1 ).round ()),
82
+ spreadRadius: 1 ,
83
+ blurRadius: 9 ,
84
+ offset: const Offset (0 , 3 ),
160
85
),
161
- ),
86
+ ]),
87
+ child: Center (
88
+ child: ListView (
89
+ padding: EdgeInsets .zero,
90
+ shrinkWrap: true ,
91
+ children: ListTile .divideTiles (context: context, tiles: [
92
+ if (Nylo .containsRoute ("/landing" ))
93
+ ListTile (
94
+ leading: FaIcon (FontAwesomeIcons .rocket),
95
+ title: Text (
96
+ "Start building" ,
97
+ ).bodyLarge (color: context.color.surfaceContent),
98
+ subtitle: Text (
99
+ "Your project is ready" ,
100
+ ).bodySmall (color: context.color.surfaceContent),
101
+ trailing: const Icon (Icons .chevron_right),
102
+ onTap: () => routeTo ("/landing" ),
103
+ ),
104
+ ListTile (
105
+ leading: FaIcon (FontAwesomeIcons .readme),
106
+ title: Text (
107
+ "Documentation" ,
108
+ ).bodyLarge (color: context.color.surfaceContent),
109
+ subtitle: Text (
110
+ "Master the framework" ,
111
+ ).bodySmall (color: context.color.surfaceContent),
112
+ trailing: const Icon (Icons .chevron_right),
113
+ onTap: widget.controller.onTapDocumentation,
114
+ ),
115
+ ListTile (
116
+ leading: FaIcon (FontAwesomeIcons .github),
117
+ title: Text (
118
+ "Github" ,
119
+ ).bodyLarge (color: context.color.surfaceContent),
120
+ subtitle: Text (
121
+ _stars == null ? "Source code" : "$_stars Stars" ,
122
+ ).bodySmall (color: context.color.surfaceContent),
123
+ trailing: const Icon (Icons .chevron_right),
124
+ onTap: widget.controller.onTapGithub,
125
+ ),
126
+ ListTile (
127
+ leading: FaIcon (FontAwesomeIcons .newspaper),
128
+ title: Text (
129
+ "Updates" ,
130
+ ).bodyLarge (color: context.color.surfaceContent),
131
+ subtitle: Text (
132
+ "View the changelog" ,
133
+ ).bodySmall (color: context.color.surfaceContent),
134
+ trailing: const Icon (Icons .chevron_right),
135
+ onTap: widget.controller.onTapChangeLog,
136
+ ),
137
+ ListTile (
138
+ leading: FaIcon (FontAwesomeIcons .youtube),
139
+ title: Text (
140
+ "YouTube Channel" ,
141
+ ).bodyLarge (color: context.color.surfaceContent),
142
+ subtitle: Text (
143
+ "Tutorial videos" ,
144
+ ).bodySmall (color: context.color.surfaceContent),
145
+ trailing: const Icon (Icons .chevron_right),
146
+ onTap: widget.controller.onTapYouTube,
147
+ ),
148
+ ListTile (
149
+ leading: FaIcon (FontAwesomeIcons .xTwitter),
150
+ title: Text (
151
+ "Follow us on X" ,
152
+ ).bodyLarge (color: context.color.surfaceContent),
153
+ subtitle: Text (
154
+ "Stay updated" ,
155
+ ).bodySmall (color: context.color.surfaceContent),
156
+ trailing: const Icon (Icons .chevron_right),
157
+ onTap: widget.controller.onTapX,
158
+ ),
159
+ ]).toList (),
162
160
),
163
- const Text (
164
- "Framework Version: $nyloVersion " ,
165
- ).bodyMedium ().setColor (context, (color) => Colors .grey),
166
- ThemeToggle (),
167
- ],
161
+ ),
168
162
),
163
+ const Text (
164
+ "Framework Version: $nyloVersion " ,
165
+ ).bodyMedium ().setColor (context, (color) => Colors .grey),
166
+ ThemeToggle (),
169
167
],
170
- )),
168
+ ),
169
+ ],
170
+ )),
171
171
);
172
172
}
173
173
}
0 commit comments