DecodeKind enum
Decoding context used by the query string parser and utilities.
This enum indicates whether a piece of text is being decoded as a key
(or key segment) or as a value. The distinction matters for
percent‑encoded dots (%2E
/ %2e
) that appear in keys:
- When decoding keys, implementations often preserve encoded dots so
higher‑level options like
allowDots
anddecodeDotInKeys
can be applied consistently during key‑splitting. - When decoding values, implementations typically perform full percent decoding.
Usage
import 'package:qs_dart/qs.dart';
DecodeKind k = DecodeKind.key; // decode a key/segment
DecodeKind v = DecodeKind.value; // decode a value
Notes
Prefer identity comparisons with enum members (e.g. kind == DecodeKind.key
).
The underlying name
/index
are implementation details and should not be
relied upon for logic.
Values
- key → const DecodeKind
-
Decode a key (or key segment). Implementations may preserve percent‑encoded dots (
%2E
/%2e
) so that dot‑splitting semantics can be applied later according to parser options. - value → const DecodeKind
-
Decode a value. Implementations typically perform full percent decoding.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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
Constants
-
values
→ const List<
DecodeKind> - A constant List of the values in this enum, in order of their declaration.