tryDecode method

BuBytes? tryDecode(
  1. String hexStr
)

Like decode, but returns null instead of throwing on invalid input.

Implementation

BuBytes? tryDecode(String hexStr) {
  try {
    return decode(hexStr);
  } catch (_) {
    return null;
  }
}