copyWith method

FuzzyOptions<T> copyWith({
  1. int? location,
  2. int? distance,
  3. double? threshold,
  4. int? maxPatternLength,
  5. bool? isCaseSensitive,
  6. Pattern? tokenSeparator,
  7. bool? findAllMatches,
  8. int? minTokenCharLength,
  9. int? minMatchCharLength,
  10. List<WeightedKey<T>>? keys,
  11. bool? shouldSort,
  12. SorterFn<T>? sortFn,
  13. bool? tokenize,
  14. bool? matchAllTokens,
  15. bool? verbose,
  16. bool? shouldNormalize,
})

Copy these options with some modifications.

Implementation

FuzzyOptions<T> copyWith({
  int? location,
  int? distance,
  double? threshold,
  int? maxPatternLength,
  bool? isCaseSensitive,
  Pattern? tokenSeparator,
  bool? findAllMatches,
  int? minTokenCharLength,
  int? minMatchCharLength,
  List<WeightedKey<T>>? keys,
  bool? shouldSort,
  SorterFn<T>? sortFn,
  bool? tokenize,
  bool? matchAllTokens,
  bool? verbose,
  bool? shouldNormalize,
}) =>
    FuzzyOptions(
      location: location ?? this.location,
      distance: distance ?? this.distance,
      threshold: threshold ?? this.threshold,
      maxPatternLength: maxPatternLength ?? this.maxPatternLength,
      isCaseSensitive: isCaseSensitive ?? this.isCaseSensitive,
      tokenSeparator: tokenSeparator ?? this.tokenSeparator,
      findAllMatches: findAllMatches ?? this.findAllMatches,
      minTokenCharLength: minTokenCharLength ?? this.minTokenCharLength,
      minMatchCharLength: minMatchCharLength ?? this.minMatchCharLength,
      keys: keys ?? this.keys,
      shouldSort: shouldSort ?? this.shouldSort,
      sortFn: sortFn ?? this.sortFn,
      tokenize: tokenize ?? this.tokenize,
      matchAllTokens: matchAllTokens ?? this.matchAllTokens,
      verbose: verbose ?? this.verbose,
      shouldNormalize: shouldNormalize ?? this.shouldNormalize,
    );