isHexColor function Null safety

bool isHexColor(
  1. String str
)

check if the string str is a hexadecimal color

Implementation

bool isHexColor(String str) {
  return _hexcolor.hasMatch(str);
}