File tree 1 file changed +20
-2
lines changed
1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,24 @@ class EmployeePresenceCardWidget extends StatelessWidget {
89
89
);
90
90
}
91
91
92
+ String checkAddressLabel () {
93
+ if (int .parse (point.substring (0 , point.length - 1 )) == 0 &&
94
+ address.isNotEmpty) {
95
+ return 'Alasan Pembatalan' ;
96
+ }
97
+
98
+ return 'Lokasi' ;
99
+ }
100
+
101
+ IconData checkAddressIcon () {
102
+ if (int .parse (point.substring (0 , point.length - 1 )) == 0 &&
103
+ address.isNotEmpty) {
104
+ return Icons .notes_rounded;
105
+ }
106
+
107
+ return Icons .location_on_rounded;
108
+ }
109
+
92
110
@override
93
111
Widget build (BuildContext context) {
94
112
return Container (
@@ -156,12 +174,12 @@ class EmployeePresenceCardWidget extends StatelessWidget {
156
174
Row (
157
175
children: < Widget > [
158
176
Icon (
159
- Icons .location_on ,
177
+ checkAddressIcon () ,
160
178
color: Colors .grey[600 ],
161
179
size: 20.0 ,
162
180
),
163
181
sizedBoxW4,
164
- Text ('Lokasi' , style: labelTextStyle)
182
+ Text (checkAddressLabel () , style: labelTextStyle)
165
183
],
166
184
),
167
185
sizedBoxH4,
You can’t perform that action at this time.
0 commit comments