@@ -24,10 +24,12 @@ Future<void> main() async {
2424 );
2525 await signInAnonymously ();
2626
27- runApp (MyApp ());
27+ runApp (const MyApp ());
2828}
2929
3030class MyApp extends StatelessWidget {
31+ const MyApp ({super .key});
32+
3133 @override
3234 Widget build (BuildContext context) {
3335 return MaterialApp (
@@ -47,9 +49,9 @@ class _CustomAppBarScreenState extends State<CustomAppBarScreenTest> {
4749 String _seletedMenu = "Posts" ;
4850
4951 static final List <Widget > _widgetOptions = < Widget > [
50- Page1 (),
51- Projectpage (),
52- Page3 (),
52+ const Page1 (),
53+ const Projectpage (),
54+ const Page3 (),
5355 GuestBook (),
5456 ];
5557
@@ -118,7 +120,7 @@ class _CustomAppBarScreenState extends State<CustomAppBarScreenTest> {
118120 child: Stack (
119121 alignment: Alignment .bottomCenter,
120122 children: [
121- Center (
123+ const Center (
122124 child: Text ("Posts" ),
123125 ),
124126 Visibility (
@@ -132,7 +134,7 @@ class _CustomAppBarScreenState extends State<CustomAppBarScreenTest> {
132134 ),
133135 ),
134136 ),
135- SizedBox (width: 10 ),
137+ const SizedBox (width: 10 ),
136138 GestureDetector (
137139 onTap: () => _onItemTapped (1 , "Projects" ),
138140 child: Container (
@@ -148,7 +150,7 @@ class _CustomAppBarScreenState extends State<CustomAppBarScreenTest> {
148150 child: Stack (
149151 alignment: Alignment .bottomCenter,
150152 children: [
151- Center (child: Text ("Projects" )),
153+ const Center (child: Text ("Projects" )),
152154 Visibility (
153155 visible: _selectedIndex == 1 ? true : false ,
154156 child: Container (
@@ -160,7 +162,7 @@ class _CustomAppBarScreenState extends State<CustomAppBarScreenTest> {
160162 ),
161163 ),
162164 ),
163- SizedBox (width: 10 ),
165+ const SizedBox (width: 10 ),
164166 GestureDetector (
165167 onTap: () => _onItemTapped (2 , "About" ),
166168 child: Container (
@@ -176,7 +178,7 @@ class _CustomAppBarScreenState extends State<CustomAppBarScreenTest> {
176178 child: Stack (
177179 alignment: Alignment .bottomCenter,
178180 children: [
179- Center (child: Text ("About" )),
181+ const Center (child: Text ("About" )),
180182 Visibility (
181183 visible: _selectedIndex == 2 ? true : false ,
182184 child: Container (
@@ -188,7 +190,7 @@ class _CustomAppBarScreenState extends State<CustomAppBarScreenTest> {
188190 ),
189191 ),
190192 ),
191- SizedBox (width: 10 ),
193+ const SizedBox (width: 10 ),
192194 GestureDetector (
193195 onTap: () => _onItemTapped (3 , "GuestBook" ),
194196 child: Container (
@@ -204,7 +206,7 @@ class _CustomAppBarScreenState extends State<CustomAppBarScreenTest> {
204206 child: Stack (
205207 alignment: Alignment .bottomCenter,
206208 children: [
207- Center (child: Text ("GuestBook" )),
209+ const Center (child: Text ("GuestBook" )),
208210 Visibility (
209211 visible: _selectedIndex == 3 ? true : false ,
210212 child: Container (
@@ -271,10 +273,10 @@ class _CustomAppBarScreenState extends State<CustomAppBarScreenTest> {
271273 children: < Widget > [
272274 Container (
273275 height: 180 ,
274- decoration: BoxDecoration (
276+ decoration: const BoxDecoration (
275277 color: Colors .transparent,
276278 ),
277- child: Center (
279+ child: const Center (
278280 child: Text (
279281 ' Sando`s Diary' ,
280282 style: TextStyle (
@@ -307,7 +309,7 @@ class _CustomAppBarScreenState extends State<CustomAppBarScreenTest> {
307309 child: Container (
308310 color: const Color (0xFFAA9AF7 ),
309311 padding: const EdgeInsets .all (12 ),
310- child: Text ('Posts' )),
312+ child: const Text ('Posts' )),
311313 ),
312314 ],
313315 )),
@@ -336,7 +338,7 @@ class _CustomAppBarScreenState extends State<CustomAppBarScreenTest> {
336338 child: Container (
337339 color: const Color (0xFFBBF5D4 ),
338340 padding: const EdgeInsets .all (12.0 ),
339- child: Text ('Projects' ))),
341+ child: const Text ('Projects' ))),
340342 ],
341343 )),
342344 ),
@@ -364,7 +366,7 @@ class _CustomAppBarScreenState extends State<CustomAppBarScreenTest> {
364366 child: Container (
365367 color: const Color (0xFFECF6BD ),
366368 padding: const EdgeInsets .all (12.0 ),
367- child: Text ('About' ))),
369+ child: const Text ('About' ))),
368370 ],
369371 )),
370372 ),
@@ -392,7 +394,7 @@ class _CustomAppBarScreenState extends State<CustomAppBarScreenTest> {
392394 child: Container (
393395 color: const Color (0xFFBEE7FE ),
394396 padding: const EdgeInsets .all (12.0 ),
395- child: Text ('GuestBook' ))),
397+ child: const Text ('GuestBook' ))),
396398 ],
397399 )),
398400 ),
@@ -438,7 +440,7 @@ class Page3 extends StatelessWidget {
438440class Page4 extends StatelessWidget {
439441 @override
440442 Widget build (BuildContext context) {
441- return Center (
443+ return const Center (
442444 child: Text (
443445 'Page 4' ,
444446 style: TextStyle (fontSize: 24 ),
0 commit comments