hexColor method
Implementation
Color hexColor() {
if (this == null) return Colors.transparent;
if (this!.startsWith('0x')) {
return Color(int.parse(this!.replaceFirst('0x', ''), radix: 16));
}
if (this!.length < 9)
return Color(int.parse('FF' + this!.replaceFirst('#', ''), radix: 16));
return Color(int.parse(this!.replaceFirst('#', ''), radix: 16));
}