Skip to content

Commit b373540

Browse files
committed
Re-enable null safety for generator
1 parent b9c9fc2 commit b373540

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

tool/generate_font.dart

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// @dart=2.9
2-
// remove above once the version package has been updated for null-safety
3-
41
import 'dart:convert';
52
import 'dart:io';
63

@@ -145,7 +142,7 @@ void main(List<String> arguments) {
145142

146143
String generateIconDocumentation(
147144
String iconName, String style, List searchTerms, String iconLabel) {
148-
searchTerms = searchTerms ?? [];
145+
searchTerms = searchTerms;
149146
var searchTermsString = searchTerms.toString();
150147
searchTermsString =
151148
searchTermsString.substring(1, searchTermsString.length - 1);
@@ -193,9 +190,7 @@ String generateDuotoneIconDefinition(String iconName, String primaryUnicode,
193190
}
194191

195192
String normalizeIconName(String iconName) {
196-
if(nameAdjustments.containsKey(iconName)) {
197-
iconName = nameAdjustments[iconName];
198-
}
193+
iconName = nameAdjustments[iconName] ?? iconName;
199194

200195
return new ReCase(iconName).camelCase;
201196
}

0 commit comments

Comments
 (0)