1+ import 'package:face_mask_detection/app/colors.dart' ;
2+ import 'package:face_mask_detection/app/icons.dart' ;
3+ import 'package:face_mask_detection/app/strings.dart' ;
14import 'package:face_mask_detection/ui/camera_screen.dart' ;
25import 'package:face_mask_detection/ui/local_storage.dart' ;
36import 'package:flutter/material.dart' ;
@@ -13,31 +16,31 @@ class HomeScreen extends StatelessWidget {
1316 actions: [
1417 IconButton (
1518 icon: Icon (
16- Icons . code,
17- color: Colors . green,
19+ code,
20+ color: green,
1821 size: 25 ,
19- semanticLabel: "Code" ,
22+ semanticLabel: codeString ,
2023 ),
2124 onPressed: () {
2225 gotoWebPage ();
2326 },
2427 )
2528 ],
26- backgroundColor: Colors . yellow.withOpacity (0.6 ),
29+ backgroundColor: yellow.withOpacity (0.6 ),
2730 title: Text (
28- 'Face Mask Detection' ,
29- style: TextStyle (color: Colors . black, fontFamily: "Gilroy" ),
31+ title ,
32+ style: TextStyle (color: black, fontFamily: gilroy ),
3033 ),
3134 ),
3235 body: Container (
3336 height: MediaQuery .of (context).size.height,
3437 decoration: BoxDecoration (
35- color: Colors . yellow.withOpacity (0.4 ),
36- border: Border .all (color: Colors . yellow, width: 5 )),
38+ color: yellow.withOpacity (0.4 ),
39+ border: Border .all (color: yellow, width: 5 )),
3740 child: Column (
3841 mainAxisAlignment: MainAxisAlignment .center,
3942 children: < Widget > [
40- Image .asset ("assets/images/ illustrator.jpeg" ),
43+ Image .asset (illustrator),
4144 SizedBox (
4245 height: 30 ,
4346 ),
@@ -49,14 +52,14 @@ class HomeScreen extends StatelessWidget {
4952 child: Container (
5053 padding: EdgeInsets .all (10 ),
5154 decoration: BoxDecoration (
52- color: Colors . yellow,
55+ color: yellow,
5356 borderRadius: BorderRadius .circular (15 ),
54- border: Border .all (width: 3 , color: Colors . white)),
57+ border: Border .all (width: 3 , color: white)),
5558 child: Text (
56- "Live camera" ,
59+ liveCamera ,
5760 style: TextStyle (
58- color: Colors . green,
59- fontFamily: "Gilroy" ,
61+ color: green,
62+ fontFamily: gilroy ,
6063 fontSize: 15 ,
6164 fontWeight: FontWeight .w200),
6265 ),
@@ -73,14 +76,14 @@ class HomeScreen extends StatelessWidget {
7376 child: Container (
7477 padding: EdgeInsets .fromLTRB (15 , 10 , 15 , 10 ),
7578 decoration: BoxDecoration (
76- color: Colors . yellow,
79+ color: yellow,
7780 borderRadius: BorderRadius .circular (15 ),
78- border: Border .all (width: 3 , color: Colors . white)),
81+ border: Border .all (width: 3 , color: white)),
7982 child: Text (
80- "From Gallery" ,
83+ fromGallery ,
8184 style: TextStyle (
82- color: Colors . green,
83- fontFamily: "Gilroy" ,
85+ color: green,
86+ fontFamily: gilroy ,
8487 fontSize: 15 ,
8588 fontWeight: FontWeight .w200),
8689 ),
@@ -93,11 +96,10 @@ class HomeScreen extends StatelessWidget {
9396 }
9497
9598 gotoWebPage () async {
96- const url = "https://github.com/shashiben/flutter-face-mask-detection" ;
97- if (await canLaunch (url)) {
98- await launch (url);
99+ if (await canLaunch (urlString)) {
100+ await launch (urlString);
99101 } else {
100- throw "Could not launch $url " ;
102+ throw "Could not launch $urlString " ;
101103 }
102104 }
103105}
0 commit comments