tryToHexString static method
Like toHexString, but returns null instead of throwing on failure
(or if dataBytes is null).
Implementation
static String? tryToHexString(
List<int>? dataBytes, {
bool lowerCase = true,
String? prefix,
}) {
if (dataBytes == null) return null;
try {
return toHexString(dataBytes, lowerCase: lowerCase, prefix: prefix);
} catch (e) {
return null;
}
}