isHexadecimal property

bool get isHexadecimal

Check if the string is a hexadecimal number

Example: HexColor => #12F

Implementation

bool get isHexadecimal => RegexUtils.hexadecimal.hasMatch(this) || matchesRegex(r'^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$');