isHexColor property
bool
get
isHexColor
Returns true if this is a valid hexadecimal color (#RGB or #RRGGBB).
Implementation
bool get isHexColor =>
RegExp(r'^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$').hasMatch(this);