fix: font not found error log (#5449)

* fix: font not found error log

* fix: flutter analyze
This commit is contained in:
Lucas.Xu
2024-06-04 09:28:28 +08:00
committed by GitHub
parent 03e8dba5f3
commit 1e485188eb
6 changed files with 10 additions and 21 deletions

View File

@ -237,8 +237,7 @@ class EditorStyleCustomizer {
try {
return getGoogleFontSafely(fontFamily, fontWeight: fontWeight);
} on Exception {
if ([defaultFontFamily, fallbackFontFamily, builtInCodeFontFamily]
.contains(fontFamily)) {
if ([defaultFontFamily, builtInCodeFontFamily].contains(fontFamily)) {
return TextStyle(fontFamily: fontFamily, fontWeight: fontWeight);
}