isHex function

bool isHex(
  1. String inputString
)

Determines if a string is an hexadecimal @param {String} inputString Potential hexadecimal string

Implementation

bool isHex(String inputString) {
  RegExp _hexadecimal = RegExp(r'^[0-9a-fA-F]+$');
  if (!_hexadecimal.hasMatch(inputString)) {
    return false;
  }
  return true;
}