dart:convert
Base64Encoder class
Base64 and base64url encoding converter.
Encodes lists of bytes using base64 or base64url encoding.
The results are ASCII strings using a restricted alphabet.
Example:
final base64Encoder = base64.encoder;
const sample = 'Dart is open source';
final encodedSample = base64Encoder.convert(sample.codeUnits);
print(encodedSample); // RGFydCBpcyBvcGVuIHNvdXJjZQ==
- Inheritance
-
Constructors
- Base64Encoder()
const
- Base64Encoder.urlSafe()
const
Properties
- hashCode → int
read-only, inherited
- The hash code for this object.
- runtimeType → Type
read-only, inherited
- A representation of the runtime type of the object.
Methods
- bind(Stream<List<int>> stream) → Stream<String>
inherited
- Transforms the provided
stream. - cast<RS, RT>() → Converter<RS, RT>
inherited
- Provides a
Converter<RS, RT> view of this stream transformer. - convert(List<int> input) → String
override
- Converts
input and returns the result of the conversion. - fuse<TT>(Converter<String, TT> other) → Converter<List<int>, TT>
inherited
- Fuses
this with other. - noSuchMethod(Invocation invocation) → dynamic
inherited
- Invoked when a non-existent method or property is accessed.
- startChunkedConversion(Sink<String> sink) → ByteConversionSink
override
- Starts a chunked conversion.
- toString() → String
inherited
- A string representation of this object.
Operators
- operator ==(Object other) → bool
inherited
- The equality operator.