getColorFromHex static method
Implementation
static int getColorFromHex(String hex) {
String hexColor = hex.toUpperCase().replaceAll('#', '');
if (hexColor.length == 6) {
hexColor = 'FF$hexColor';
}
return int.parse(hexColor, radix: 16);
}