isBase64 function
Checks if the string is Base64 encoded.
By default the standard Base64 alphabet is used. Set urlSafe to true
to validate against the URL- and filename-safe alphabet.
Example:
isBase64('aGVsbG8='); // true
isBase64('aGVsbG8'); // false (invalid padding)
isBase64('aGVsbG8', urlSafe: true); // true
Implementation
bool isBase64(String str, {bool urlSafe = false}) => _isBase64(str, urlSafe);