tryToBytes static method
Like toBytes, but returns null instead of throwing (or if v is null).
Implementation
static BuBytes? tryToBytes(String? v) {
if (v == null) return null;
try {
return toBytes(v);
} catch (_) {
return null;
}
}