tryDecode static method
Tries to decode a Base64 string, returning null if decoding fails.
Same parameters as decode, but catches exceptions and returns null on error.
Implementation
static List<int>? tryDecode(String data,
{bool validatePadding = true, bool urlSafe = true}) {
try {
return decode(data, urlSafe: urlSafe, validatePadding: validatePadding);
} catch (_) {
return null;
}
}