Spec-Zone.ru › Dart 2

dart:convert

Base64Decoder class

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
Inheritance
  • Object
  • StreamTransformerBase<String, List<int>>
  • Converter<String, List<int>>
  • Base64Decoder

Constructors

Base64Decoder()
const

Properties

hashCode → int
read-onlyinherited
The hash code for this object.
runtimeType → Type
read-onlyinherited
A representation of the runtime type of the object.

Methods

bind(Stream<String> stream) → Stream<List<int>>
inherited
Transforms the provided stream.
cast<RS, RT>() → Converter<RS, RT>
inherited
Provides a Converter<RS, RT> view of this stream transformer.
convert(String input, [int start = 0, int? end]) → Uint8List
override
Decodes the characters of input from start to end as base64.
fuse<TT>(Converter<List<int>, TT> other) → Converter<String, TT>
inherited
Fuses this with other.
noSuchMethod(Invocation invocation) → dynamic
inherited
Invoked when a non-existent method or property is accessed.
startChunkedConversion(Sink<List<int>> sink) → StringConversionSink
override
Starts a chunked conversion.
toString() → String
inherited
A string representation of this object.

Operators

operator ==(Object other) → bool
inherited
The equality operator.

© 2012 the Dart project authors
Licensed under the BSD 3-Clause "New" or "Revised" License.
https://api.dart.dev/stable/2.19.6/dart-convert/Base64Decoder-class.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API