hexColorRegStr top-level property

String hexColorRegStr
getter/setter pair
  • The pattern used by the hexColorReg regular expression.
  • The pattern matches any string that contains a valid hexadecimal color code.
  • The pattern allows for an optional leading '#' character, followed by either 3 or 6 hexadecimal digits (0-9, a-f, A-F).

Implementation

String hexColorRegStr = r'^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$';