BatchTranslationConfig class
Configuration for batch translation behavior.
Allows customization of debounce timing, maximum batch size, and whether batching is enabled.
Constructors
- BatchTranslationConfig({Duration debounceDuration = const Duration(milliseconds: 100), int maxBatchSize = 100, bool enabled = true, int maxRetries = 3})
-
Creates a new BatchTranslationConfig.
const
Properties
- debounceDuration → Duration
-
Duration to wait before sending a batch request.
final
- enabled → bool
-
Whether batch translation is enabled.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxBatchSize → int
-
Maximum number of texts to include in a single batch.
final
- maxRetries → int
-
Maximum number of retry attempts for failed translations.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{Duration? debounceDuration, int? maxBatchSize, bool? enabled, int? maxRetries}) → BatchTranslationConfig - Creates a copy with modified fields.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- defaultConfig → const BatchTranslationConfig
- Default configuration with standard settings.
- disabled → const BatchTranslationConfig
- Configuration with batching disabled.