copyWith method

TextifyConfig copyWith({
  1. int? dilationSize,
  2. bool? excludeLongLines,
  3. bool? attemptCharacterSplitting,
  4. bool? applyDictionaryCorrection,
  5. double? matchingThreshold,
  6. int? maxProcessingTimeMs,
})

Creates a copy of this TextifyConfig with the given fields replaced.

Implementation

TextifyConfig copyWith({
  int? dilationSize,
  bool? excludeLongLines,
  bool? attemptCharacterSplitting,
  bool? applyDictionaryCorrection,
  double? matchingThreshold,
  int? maxProcessingTimeMs,
}) {
  return TextifyConfig(
    dilationSize: dilationSize ?? this.dilationSize,
    excludeLongLines: excludeLongLines ?? this.excludeLongLines,
    attemptCharacterSplitting:
        attemptCharacterSplitting ?? this.attemptCharacterSplitting,
    applyDictionaryCorrection:
        applyDictionaryCorrection ?? this.applyDictionaryCorrection,
    matchingThreshold: matchingThreshold ?? this.matchingThreshold,
    maxProcessingTimeMs: maxProcessingTimeMs ?? this.maxProcessingTimeMs,
  );
}