PercentCodec class

A codec that converts byte arrays to and from percent-encoded (also known as URL-encoded) strings according to RFC 3986.

encoder encodes all bytes other than ASCII letters, decimal digits, or one of -._~. This matches the behavior of Uri.encodeQueryComponent except that it doesn't encode 0x20 bytes to the + character.

To be maximally flexible, decoder will decode any percent-encoded byte and will allow any non-percent-encoded byte other than %. By default, it interprets + as 0x2B rather than 0x20 as emitted by Uri.encodeQueryComponent.

Inheritance

Properties

decoder PercentDecoder
Returns the decoder of this, converting from T to S.
no setteroverride
encoder PercentEncoder
Returns the encoder from S to T.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
inverted Codec<String, List<int>>
Inverts this.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

decode(String encoded) List<int>
Decodes encoded data.
inherited
encode(List<int> input) String
Encodes input.
inherited
fuse<R>(Codec<String, R> other) Codec<List<int>, R>
Fuses this with other.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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