tryFromHexString static method
Tries to convert a hexadecimal string data
into a List of integers.
If data
is null, returns null. Otherwise, attempts to parse the
hexadecimal string using the fromHexString function. If successful,
returns the resulting List of integers; otherwise, returns null.
Implementation
static List<int>? tryFromHexString(String? data) {
if (data == null) return null;
try {
return fromHexString(data);
} catch (e) {
return null;
}
}