bool isHexString(String value) { final hexPattern = RegExp(r'^[0-9a-fA-F]+$', caseSensitive: false); return hexPattern.hasMatch(value); }