tryFromHexString static method
Like fromHexString, but returns null instead of throwing on failure
(or if data is null).
Implementation
static BuBytes? tryFromHexString(String? data, {bool paddingZero = false}) {
if (data == null) return null;
try {
return fromHexString(data, paddingZero: paddingZero);
} catch (e) {
return null;
}
}