hexToColor function

Color hexToColor(
  1. String hexColor
)

Implementation

Color hexToColor(String hexColor) {
  String formattedColor = hexColor.replaceAll("#", "");
  int colorValue = int.parse(formattedColor, radix: 16);
  return Color(colorValue).withAlpha(0xFF);
}