DecodeOptions class final

Options that configure the output of QS.decode.

Invariants are asserted in debug builds and validated at runtime via validate (used by decode entry points).

Constructors

DecodeOptions({bool? allowDots, Decoder? decoder, @Deprecated('Use Decoder instead; see DecodeOptions.decoder') LegacyDecoder? legacyDecoder, bool? decodeDotInKeys, bool allowEmptyLists = false, int listLimit = 20, Encoding charset = utf8, bool charsetSentinel = false, bool comma = false, Pattern delimiter = '&', int depth = 5, Duplicates duplicates = Duplicates.combine, bool ignoreQueryPrefix = false, bool interpretNumericEntities = false, num parameterLimit = 1000, bool parseLists = true, bool strictDepth = false, bool strictMerge = true, bool strictNullHandling = false, bool throwOnLimitExceeded = false})
const

Properties

allowDots → bool
When true, decode dot notation in keys: a.b=c → {a: {b: "c"}}.
final
allowEmptyLists → bool
When true, allow empty list values to be produced from inputs like a[]= without coercing or discarding them.
final
charset → Encoding
Character encoding used to decode percent‑encoded bytes in the input. Only utf8 and latin1 are supported.
final
charsetSentinel → bool
Enable opt‑in charset detection via a utf8=✓ sentinel parameter.
final
comma → bool
Parse the entire input as a comma‑separated value instead of key/value pairs. Nested maps (e.g., a={b:1},{c:d}) are not supported in this mode.
final
decodeDotInKeys → bool
Decode dots that appear in keys (e.g., a.b=c).
final
delimiter → Pattern
Delimiter used to split key/value pairs. May be a String (e.g., "&") or a RegExp for pattern‑based splitting.
final
depth → int
Maximum nesting depth when constructing maps from bracket notation. The default (5) is a protective limit against abuse; raise it only when you control the inputs.
final
duplicates → Duplicates
Strategy to apply when the same key appears multiple times.
final
hashCode → int
The hash code for this object.
no setterinherited
ignoreQueryPrefix → bool
Ignore a leading ? query prefix if present.
final
interpretNumericEntities → bool
Interpret HTML numeric entities like &#...; in tokens before decoding.
final
listLimit → int
Maximum list size that will be honored when decoding bracket lists.
final
parameterLimit → num
Maximum number of parameters to parse before applying limits. Defaults to 1000 to guard against excessively long inputs.
final
parseLists → bool
Disable list parsing entirely when false (treat bracket indices as string keys).
final
props → List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
strictDepth → bool
When true, exceeding depth results in a thrown error instead of a soft limit.
final
strictMerge → bool
When true, object/scalar merge conflicts are wrapped in a list.
final
strictNullHandling → bool
When true, tokens without an = (e.g., ?flag) decode to null rather than "".
final
stringify → bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
throwOnLimitExceeded → bool
When true, exceeding limits throws instead of applying a soft cap.
final

Methods

copyWith({bool? allowDots, bool? allowEmptyLists, int? listLimit, Encoding? charset, bool? charsetSentinel, bool? comma, bool? decodeDotInKeys, Pattern? delimiter, int? depth, Duplicates? duplicates, bool? ignoreQueryPrefix, bool? interpretNumericEntities, num? parameterLimit, bool? parseLists, bool? strictNullHandling, bool? strictDepth, bool? strictMerge, bool? throwOnLimitExceeded, Decoder? decoder, LegacyDecoder? legacyDecoder}) → DecodeOptions
Return a new DecodeOptions with the provided overrides.
decode(String? value, {Encoding? charset, DecodeKind kind = DecodeKind.value}) → dynamic
Unified scalar decode with key/value context.
decodeKey(String? value, {Encoding? charset}) → String?
Convenience: decode a key and coerce the result to String (or null).
decoder(String? value, {Encoding? charset, DecodeKind kind = DecodeKind.value}) → dynamic
Deprecated: use decode. This wrapper will be removed in a future release.
decodeValue(String? value, {Encoding? charset}) → dynamic
Convenience: decode a value token.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override
validate() → void
Validates option invariants (used by QS.decode and direct decoder calls).

Operators

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