tryToBytes static method
Implementation
static List<int>? tryToBytes(String? v) {
if (v == null) return null;
try {
if (isHexBytes(v)) {
return BytesUtils.fromHexString(v);
} else {
return encode(v);
}
} catch (e) {
return null;
}
}