copyWith method

NormalizationOptions copyWith({
  1. bool? enabled,
  2. bool? trimWhitespace,
  3. bool? removeSpaces,
  4. bool? toLowerCase,
  5. bool? removeSpecialChars,
  6. bool? removeAccents,
  7. String? locale,
  8. PreProcessor? preProcessor,
  9. PostProcessor? postProcessor,
  10. Tokenizer? tokenizer,
})

Creates a copy of this object with the given fields replaced with the new values.

Implementation

NormalizationOptions copyWith({
  bool? enabled,
  bool? trimWhitespace,
  bool? removeSpaces,
  bool? toLowerCase,
  bool? removeSpecialChars,
  bool? removeAccents,
  String? locale,
  PreProcessor? preProcessor,
  PostProcessor? postProcessor,
  Tokenizer? tokenizer,
}) {
  return NormalizationOptions(
    enabled: enabled ?? this.enabled,
    trimWhitespace: trimWhitespace ?? this.trimWhitespace,
    removeSpaces: removeSpaces ?? this.removeSpaces,
    toLowerCase: toLowerCase ?? this.toLowerCase,
    removeSpecialChars: removeSpecialChars ?? this.removeSpecialChars,
    removeAccents: removeAccents ?? this.removeAccents,
    locale: locale ?? this.locale,
    preProcessor: preProcessor ?? this.preProcessor,
    postProcessor: postProcessor ?? this.postProcessor,
    tokenizer: tokenizer ?? this.tokenizer,
  );
}