isHex function

bool isHex(
  1. String inputString
)

Determines if a string is an hexadecimal.

Implementation

bool isHex(String inputString) {
  final hexadecimal = RegExp(r'^([0-9A-Fa-f])*$');
  if (!hexadecimal.hasMatch(inputString)) {
    return false;
  }
  return true;
}