EncodeOptions constructor

const EncodeOptions({
  1. Encoder? encoder,
  2. DateSerializer? serializeDate,
  3. ListFormat? listFormat,
  4. @Deprecated('Use listFormat instead') bool? indices,
  5. bool? allowDots,
  6. bool addQueryPrefix = false,
  7. bool allowEmptyLists = false,
  8. Encoding charset = utf8,
  9. bool charsetSentinel = false,
  10. String delimiter = '&',
  11. bool encode = true,
  12. bool encodeDotInKeys = false,
  13. bool encodeValuesOnly = false,
  14. Format format = Format.rfc3986,
  15. dynamic filter,
  16. bool skipNulls = false,
  17. bool strictNullHandling = false,
  18. bool? commaRoundTrip,
  19. 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',
      );