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

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

AdaptiveConfig.new({required int maxBatchSize, required int compressionLevel, required int requestTimeoutMs, required int retryIntervalMs, required int maxConcurrentRequests})
Creates an adaptive configuration with the specified parameters

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