merge method

WriteOptions merge({
  1. int? batchSize,
  2. int? flushInterval,
  3. Map<String, String>? defaultTags,
  4. int? retryJitter,
  5. int? retryInterval,
  6. int? maxRetryDelay,
  7. int? maxRetryTime,
  8. int? exponentialBase,
  9. int? maxRetries,
  10. int? maxBufferLines,
  11. WritePrecision? precision,
  12. bool? gzip,
})

Create a WriteOptions from current instance with merging attributes.

The gzip compression cannot be enabled if you are using web platform as a target of your application; for more info see https://github.com/influxdata/influxdb/pull/23038.

Implementation

WriteOptions merge(
    {int? batchSize,
    int? flushInterval,
    Map<String, String>? defaultTags,
    int? retryJitter,
    int? retryInterval,
    int? maxRetryDelay,
    int? maxRetryTime,
    int? exponentialBase,
    int? maxRetries,
    int? maxBufferLines,
    WritePrecision? precision,
    bool? gzip}) {
  return WriteOptions(
    batchSize: batchSize ?? this.batchSize,
    flushInterval: flushInterval ?? this.flushInterval,
    retryJitter: retryJitter ?? this.retryJitter,
    retryInterval: retryInterval ?? this.retryInterval,
    maxRetryDelay: maxRetryDelay ?? this.maxRetryDelay,
    maxRetryTime: maxRetryTime ?? this.maxRetryTime,
    exponentialBase: exponentialBase ?? this.exponentialBase,
    maxRetries: maxRetries ?? this.maxRetries,
    maxBufferLines: maxBufferLines ?? this.maxBufferLines,
    defaultTags: defaultTags ?? Map.from(this.defaultTags ?? {}),
    precision: precision ?? this.precision,
    gzip: gzip ?? this.gzip,
  );
}