DecodeOptions constructor

const DecodeOptions({
  1. bool? allowDots,
  2. Decoder? decoder,
  3. @Deprecated('Use Decoder instead; see DecodeOptions.decoder') LegacyDecoder? legacyDecoder,
  4. bool? decodeDotInKeys,
  5. bool allowEmptyLists = false,
  6. int listLimit = 20,
  7. Encoding charset = utf8,
  8. bool charsetSentinel = false,
  9. bool comma = false,
  10. Pattern delimiter = '&',
  11. int depth = 5,
  12. Duplicates duplicates = Duplicates.combine,
  13. bool ignoreQueryPrefix = false,
  14. bool interpretNumericEntities = false,
  15. num parameterLimit = 1000,
  16. bool parseLists = true,
  17. bool strictDepth = false,
  18. bool strictNullHandling = false,
  19. bool throwOnLimitExceeded = false,
})

Implementation

const DecodeOptions({
  bool? allowDots,
  Decoder? decoder,
  @Deprecated('Use Decoder instead; see DecodeOptions.decoder')
  LegacyDecoder? legacyDecoder,
  bool? decodeDotInKeys,
  this.allowEmptyLists = false,
  this.listLimit = 20,
  this.charset = utf8,
  this.charsetSentinel = false,
  this.comma = false,
  this.delimiter = '&',
  this.depth = 5,
  this.duplicates = Duplicates.combine,
  this.ignoreQueryPrefix = false,
  this.interpretNumericEntities = false,
  this.parameterLimit = 1000,
  this.parseLists = true,
  this.strictDepth = false,
  this.strictNullHandling = false,
  this.throwOnLimitExceeded = false,
})  : allowDots = allowDots ?? (decodeDotInKeys ?? false),
      decodeDotInKeys = decodeDotInKeys ?? false,
      _decoder = decoder,
      _legacyDecoder = legacyDecoder,
      assert(
        charset == utf8 || charset == latin1,
        'Invalid charset',
      ),
      assert(
        !(decodeDotInKeys ?? false) || allowDots != false,
        'decodeDotInKeys requires allowDots to be true',
      ),
      assert(
        parameterLimit > 0,
        'Parameter limit must be positive',
      );