AdaptiveConfig class
Adaptive configuration based on network conditions
Automatically adjusts network request parameters based on detected bandwidth and connection quality to optimize performance and reliability.
Properties
- maxBatchSize: Maximum number of requests to batch together
- compressionLevel: Level of payload compression (0-10, higher = more compression)
- requestTimeoutMs: Request timeout in milliseconds
- retryIntervalMs: Interval between retry attempts in milliseconds
- maxConcurrentRequests: Maximum number of concurrent network requests
Usage
This class is typically created automatically by BandwidthMonitor.getAdaptiveConfig() based on current network conditions. Different network quality levels will produce different configurations:
- Excellent: Large batches, light compression, short timeouts
- Good: Medium batches, moderate compression, standard timeouts
- Fair: Small batches, higher compression, longer timeouts
- Poor: Minimal batches, high compression, extended timeouts
- Terrible: Single requests, maximum compression, very long timeouts
Constructors
Properties
- compressionLevel → int
-
Level of payload compression (0-10, higher = more compression)
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxBatchSize → int
-
Maximum number of requests to batch together
final
- maxConcurrentRequests → int
-
Maximum number of concurrent network requests
final
- requestTimeoutMs → int
-
Request timeout in milliseconds
final
- retryIntervalMs → int
-
Interval between retry attempts in milliseconds
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited