isHexColor function

bool isHexColor(
  1. String str
)

Returns true if str is a valid hex color (e.g. #FFF or #FFFFFF).

Implementation

bool isHexColor(String str) => hexColorReg.hasMatch(str);