Skip to content

Commit 2de4fd5

Browse files
authored
Merge branch 'main' into 20b2dependabot/gradle/android/com.android.application-8.13.0
2 parents f3c1d09 + 70c1f54 commit 2de4fd5

13 files changed

+774
-289
lines changed

lib/card_templates/employee_id_card_widget.dart

Lines changed: 78 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -15,62 +15,95 @@ class EmployeeIdCardWidget extends StatelessWidget {
1515
Widget build(BuildContext context) {
1616
return Center(
1717
child: Container(
18-
width: 144,
19-
height: 250,
18+
width: 320,
19+
height: 180,
2020
decoration: BoxDecoration(
2121
color: Colors.white,
2222
borderRadius: BorderRadius.circular(16),
2323
boxShadow: const [BoxShadow(color: Colors.black12, blurRadius: 4)],
2424
),
2525
child: Padding(
2626
padding: const EdgeInsets.all(12.0),
27-
child: Column(
27+
child: Row(
2828
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+
],
6983
),
84+
const SizedBox(width: 40),
7085
Expanded(
7186
child: Column(
72-
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
87+
mainAxisAlignment: MainAxisAlignment.center,
88+
crossAxisAlignment: CrossAxisAlignment.start,
7389
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),
74107
_buildInfoRow(appLocalizations.nameLabel, data.name),
75108
_buildInfoRow(
76109
appLocalizations.positionLabel, data.position),
@@ -80,31 +113,6 @@ class EmployeeIdCardWidget extends StatelessWidget {
80113
],
81114
),
82115
),
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-
),
108116
],
109117
),
110118
),
@@ -122,7 +130,7 @@ class EmployeeIdCardWidget extends StatelessWidget {
122130
displayText,
123131
style: TextStyle(
124132
fontWeight: FontWeight.w500,
125-
fontSize: 9,
133+
fontSize: 14,
126134
color: isEmpty ? Colors.grey[400] : Colors.black,
127135
),
128136
textAlign: TextAlign.center,

0 commit comments

Comments
 (0)