isHexadecimalNumber static method
Whether v is a valid hexadecimal number, with an optional 0x prefix.
Implementation
static bool isHexadecimalNumber(String v) {
final RegExp hexaDecimalRegex = RegExp(r'^(0x|0X)?[0-9A-Fa-f]+$');
return hexaDecimalRegex.hasMatch(v);
}