fix: handle language color null

This commit is contained in:
Rongjian Zhang 2019-09-02 18:14:17 +08:00
parent 83f3fbbdcf
commit b083c4fadd
1 changed files with 4 additions and 0 deletions

View File

@ -14,6 +14,10 @@ class StorageKeys {
}
Color convertColor(String cssHex) {
if (cssHex == null) {
return Color(0xffcccccc); // Default color
}
if (cssHex.startsWith('#')) {
cssHex = cssHex.substring(1);
}