Decoder for base64 encoded data.
This decoder accepts both base64 and base64url ("url-safe") encodings.
The encoding is required to be properly padded.
Throws a FormatException if the input is not valid base64 data.
Example:
final base64Decoder = base64.decoder; const base64Bytes = 'RGFydCBpcyBvcGVuIHNvdXJjZQ=='; final decodedBytes = base64Decoder.convert(base64Bytes); // decodedBytes: [68, 97, 114, 116, 32, 105, 115, 32, 111, 112, 101, 110, // 32, 115, 111, 117, 114, 99, 101] // Print as string using UTF-8 decoder print(utf8.decode(decodedBytes)); // Dart is open source
stream. Converter<RS, RT> view of this stream transformer. input from start to end as base64. this with other.
© 2012 the Dart project authors
Licensed under the BSD 3-Clause "New" or "Revised" License.
https://api.dart.dev/stable/2.18.5/dart-convert/Base64Decoder-class.html