static int? tryHexToInt(String? v) { if (v == null || v == "0x") return null; try { return hexToInt(v); } catch (e) { return null; } }