EncodeOptions constructor
const
EncodeOptions({ - Encoder? encoder,
- DateSerializer? serializeDate,
- ListFormat? listFormat,
- @Deprecated('Use listFormat instead') bool? indices,
- bool? allowDots,
- bool addQueryPrefix = false,
- bool allowEmptyLists = false,
- Encoding charset = utf8,
- bool charsetSentinel = false,
- String delimiter = '&',
- bool encode = true,
- bool encodeDotInKeys = false,
- bool encodeValuesOnly = false,
- Format format = Format.rfc3986,
- dynamic filter,
- bool skipNulls = false,
- bool strictNullHandling = false,
- bool? commaRoundTrip,
- Sorter? sort,
})
Implementation
const EncodeOptions({
Encoder? encoder,
DateSerializer? serializeDate,
ListFormat? listFormat,
@Deprecated('Use listFormat instead') bool? indices,
bool? allowDots,
this.addQueryPrefix = false,
this.allowEmptyLists = false,
this.charset = utf8,
this.charsetSentinel = false,
this.delimiter = '&',
this.encode = true,
this.encodeDotInKeys = false,
this.encodeValuesOnly = false,
this.format = Format.rfc3986,
this.filter,
this.skipNulls = false,
this.strictNullHandling = false,
this.commaRoundTrip,
this.sort,
}) : allowDots = allowDots ?? encodeDotInKeys || false,
listFormat = listFormat ??
(indices == false ? ListFormat.repeat : null) ??
ListFormat.indices,
_serializeDate = serializeDate,
_encoder = encoder,
assert(
charset == utf8 || charset == latin1,
'Invalid charset',
),
assert(
filter == null || filter is Function || filter is Iterable,
'Invalid filter',
);