@@ -15,62 +15,95 @@ class EmployeeIdCardWidget extends StatelessWidget {
15
15
Widget build (BuildContext context) {
16
16
return Center (
17
17
child: Container (
18
- width: 144 ,
19
- height: 250 ,
18
+ width: 320 ,
19
+ height: 180 ,
20
20
decoration: BoxDecoration (
21
21
color: Colors .white,
22
22
borderRadius: BorderRadius .circular (16 ),
23
23
boxShadow: const [BoxShadow (color: Colors .black12, blurRadius: 4 )],
24
24
),
25
25
child: Padding (
26
26
padding: const EdgeInsets .all (12.0 ),
27
- child: Column (
27
+ child: Row (
28
28
children: [
29
- data.profileImage != null
30
- ? ClipRRect (
31
- borderRadius: BorderRadius .circular (12.0 ),
32
- child: Image .file (
33
- data.profileImage! ,
34
- width: 90 ,
35
- height: 90 ,
36
- fit: BoxFit .cover,
37
- ),
38
- )
39
- : Container (
40
- width: 90 ,
41
- height: 90 ,
42
- decoration: BoxDecoration (
43
- color: Colors .grey[200 ],
44
- borderRadius: BorderRadius .circular (12.0 ),
45
- border: Border .all (color: Colors .grey[300 ]! , width: 1 ),
46
- ),
47
- child: const Icon (
48
- Icons .person_outline,
49
- size: 48 ,
50
- color: Colors .grey,
51
- ),
52
- ),
53
- const SizedBox (height: 8 ),
54
- Text (
55
- data.companyName.isNotEmpty
56
- ? data.companyName
57
- : appLocalizations.defaultCompanyName,
58
- style: TextStyle (
59
- fontSize: 10 ,
60
- fontWeight: FontWeight .bold,
61
- letterSpacing: 1.5 ,
62
- color: data.companyName.isEmpty
63
- ? Colors .grey[400 ]
64
- : Colors .black,
65
- ),
66
- textAlign: TextAlign .center,
67
- maxLines: 2 ,
68
- overflow: TextOverflow .ellipsis,
29
+ Column (
30
+ mainAxisAlignment: MainAxisAlignment .center,
31
+ children: [
32
+ data.profileImage != null
33
+ ? ClipRRect (
34
+ borderRadius: BorderRadius .circular (12.0 ),
35
+ child: Image .file (
36
+ data.profileImage! ,
37
+ width: 72 ,
38
+ height: 72 ,
39
+ fit: BoxFit .cover,
40
+ ),
41
+ )
42
+ : Container (
43
+ width: 72 ,
44
+ height: 72 ,
45
+ decoration: BoxDecoration (
46
+ color: Colors .grey[200 ],
47
+ borderRadius: BorderRadius .circular (12.0 ),
48
+ border:
49
+ Border .all (color: Colors .grey[300 ]! , width: 1 ),
50
+ ),
51
+ child: const Icon (
52
+ Icons .person_outline,
53
+ size: 36 ,
54
+ color: Colors .grey,
55
+ ),
56
+ ),
57
+ const SizedBox (height: 8 ),
58
+ SizedBox (
59
+ width: 64 ,
60
+ height: 64 ,
61
+ child: data.qrData.isNotEmpty
62
+ ? BarcodeWidget (
63
+ barcode: Barcode .qrCode (),
64
+ data: data.qrData,
65
+ width: 64 ,
66
+ height: 64 ,
67
+ )
68
+ : Container (
69
+ decoration: BoxDecoration (
70
+ color: Colors .grey[100 ],
71
+ borderRadius: BorderRadius .circular (4 ),
72
+ border: Border .all (
73
+ color: Colors .grey[300 ]! , width: 1 ),
74
+ ),
75
+ child: Icon (
76
+ Icons .qr_code,
77
+ color: Colors .grey[400 ],
78
+ size: 28 ,
79
+ ),
80
+ ),
81
+ ),
82
+ ],
69
83
),
84
+ const SizedBox (width: 40 ),
70
85
Expanded (
71
86
child: Column (
72
- mainAxisAlignment: MainAxisAlignment .spaceEvenly,
87
+ mainAxisAlignment: MainAxisAlignment .center,
88
+ crossAxisAlignment: CrossAxisAlignment .start,
73
89
children: [
90
+ Text (
91
+ data.companyName.isNotEmpty
92
+ ? data.companyName
93
+ : appLocalizations.defaultCompanyName,
94
+ style: TextStyle (
95
+ fontSize: 14 ,
96
+ fontWeight: FontWeight .bold,
97
+ letterSpacing: 1.2 ,
98
+ color: data.companyName.isEmpty
99
+ ? Colors .grey[400 ]
100
+ : Colors .black,
101
+ ),
102
+ textAlign: TextAlign .left,
103
+ maxLines: 2 ,
104
+ overflow: TextOverflow .ellipsis,
105
+ ),
106
+ const SizedBox (height: 8 ),
74
107
_buildInfoRow (appLocalizations.nameLabel, data.name),
75
108
_buildInfoRow (
76
109
appLocalizations.positionLabel, data.position),
@@ -80,31 +113,6 @@ class EmployeeIdCardWidget extends StatelessWidget {
80
113
],
81
114
),
82
115
),
83
- const SizedBox (height: 8 ),
84
- SizedBox (
85
- width: 40 ,
86
- height: 40 ,
87
- child: data.qrData.isNotEmpty
88
- ? BarcodeWidget (
89
- barcode: Barcode .qrCode (),
90
- data: data.qrData,
91
- width: 40 ,
92
- height: 40 ,
93
- )
94
- : Container (
95
- decoration: BoxDecoration (
96
- color: Colors .grey[100 ],
97
- borderRadius: BorderRadius .circular (4 ),
98
- border:
99
- Border .all (color: Colors .grey[300 ]! , width: 1 ),
100
- ),
101
- child: Icon (
102
- Icons .qr_code,
103
- color: Colors .grey[400 ],
104
- size: 24 ,
105
- ),
106
- ),
107
- ),
108
116
],
109
117
),
110
118
),
@@ -122,7 +130,7 @@ class EmployeeIdCardWidget extends StatelessWidget {
122
130
displayText,
123
131
style: TextStyle (
124
132
fontWeight: FontWeight .w500,
125
- fontSize: 9 ,
133
+ fontSize: 14 ,
126
134
color: isEmpty ? Colors .grey[400 ] : Colors .black,
127
135
),
128
136
textAlign: TextAlign .center,
0 commit comments