toColor method
Implementation
Color? toColor() {
try {
if (startsWith('#')) {
return Color(int.parse(replaceAll('#', '0xff')));
} else {
return Color(int.parse(this));
}
} catch (e) {
return null;
}
}
Color? toColor() {
try {
if (startsWith('#')) {
return Color(int.parse(replaceAll('#', '0xff')));
} else {
return Color(int.parse(this));
}
} catch (e) {
return null;
}
}