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.
Properties
- decoder → PercentDecoder
-
Returns the decoder of
this
, converting fromT
toS
. [...]read-only, override - encoder → PercentEncoder
-
Returns the encoder from
S
toT
. [...]read-only, override - hashCode → int
-
The hash code for this object. [...]
read-only, inherited
-
inverted
→ Codec<
String, List< int>> -
Inverts
this
. [...]read-only, inherited - runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
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
withother
. [...]inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator ==(
dynamic other) → bool -
The equality operator. [...]
inherited