tryEncode method
Like encode, but returns null instead of throwing on invalid input.
Implementation
String? tryEncode(List<int> data, {bool lowerCase = true}) {
try {
return encode(data, lowerCase: lowerCase);
} catch (_) {
return null;
}
}