fix: handle language color null
This commit is contained in:
parent
83f3fbbdcf
commit
b083c4fadd
|
@ -14,6 +14,10 @@ class StorageKeys {
|
||||||
}
|
}
|
||||||
|
|
||||||
Color convertColor(String cssHex) {
|
Color convertColor(String cssHex) {
|
||||||
|
if (cssHex == null) {
|
||||||
|
return Color(0xffcccccc); // Default color
|
||||||
|
}
|
||||||
|
|
||||||
if (cssHex.startsWith('#')) {
|
if (cssHex.startsWith('#')) {
|
||||||
cssHex = cssHex.substring(1);
|
cssHex = cssHex.substring(1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue