AutoSuggestConfig class
Configuration for AutoSuggestCubit
Similar to SmartPagination configuration, this controls the behavior of the auto-suggest cubit including debouncing, caching, and retry logic.
Constructors
- AutoSuggestConfig({Duration debounceDelay = const Duration(milliseconds: 300), int minSearchLength = 2, Duration? dataAge = const Duration(minutes: 30), int maxCacheSize = 100, bool enablePrefixMatching = true, RetryConfig? retryConfig, bool showLoadingForCache = false, bool keepPreviousOnLoading = true})
-
const
Properties
- dataAge → Duration?
-
How long to cache results (null for no expiry)
final
- debounceDelay → Duration
-
Delay before executing search after user stops typing
final
- enablePrefixMatching → bool
-
Whether to use prefix matching for cache lookups
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- keepPreviousOnLoading → bool
-
Whether to keep previous results while loading
final
- maxCacheSize → int
-
Maximum number of items to cache
final
- minSearchLength → int
-
Minimum number of characters required to trigger search
final
- retryConfig → RetryConfig?
-
Retry configuration for failed requests
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showLoadingForCache → bool
-
Whether to emit loading state for cached results
final
Methods
-
copyWith(
{Duration? debounceDelay, int? minSearchLength, Duration? dataAge, int? maxCacheSize, bool? enablePrefixMatching, RetryConfig? retryConfig, bool? showLoadingForCache, bool? keepPreviousOnLoading}) → AutoSuggestConfig -
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