Skip to content

Commit 4423f5c

Browse files
committed
Fix #244 by returning null if no icon is found
1 parent 44ea1db commit 4423f5c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

util/lib/main.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,8 @@ to complete successfully.
285285
'/// name starting with `fa-`. Should multiple classes fulfill these',
286286
'/// requirements, the first occurrence is chosen.',
287287
'/// ',
288-
'/// Returns [FontAwesomeIcons.circleQuestion] if no icon matches.',
289-
'IconData getIconFromCss(String cssClasses) {',
288+
'/// Returns null if no icon matches.',
289+
'IconData? getIconFromCss(String cssClasses) {',
290290
' const Map<String, String> cssStyles = {',
291291
" 'far': 'regular', 'fas': 'solid', 'fab': 'brands',",
292292
" 'fad': 'duotone', 'fal': 'light', 'fat': 'thin',",
@@ -303,7 +303,7 @@ to complete successfully.
303303
'',
304304
" return faIconNameMapping[style + ' ' + icon] ?? FontAwesomeIcons.circleQuestion;",
305305
' } on StateError {',
306-
' return FontAwesomeIcons.circleQuestion;',
306+
' return null;',
307307
' }',
308308
'}',
309309
'',

0 commit comments

Comments
 (0)