NetworkQualityMonitor class

Monitors network quality and estimates bandwidth. Provides adaptive prefetch configuration based on detected network conditions.

Properties

currentType → NetworkType
Get current network type value
no setter
estimatedBandwidth → double
Get current estimated bandwidth in KB/s
no setter
hashCode → int
The hash code for this object.
no setterinherited
networkType → ValueListenable<NetworkType>
Listen to network type changes
no setter
prefetchConfig → PrefetchConfig
Get current prefetch config based on network conditions
no setter
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
recordBandwidthSample(int bytes, Duration duration) → void
Record a bandwidth sample from a download Call this after each download completes with bytes downloaded and duration
reset() → void
Reset to default state
setNetworkType(NetworkType type) → void
Manually set network type (useful when connectivity_plus is not available)
toString() → String
A string representation of this object.
inherited
updateFromConnectivity({bool? isWifi, bool? isMobile}) → void
Update network type from connectivity status Pass true if connected via WiFi, false if mobile, null if offline

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

instance → NetworkQualityMonitor
final

Constants

maxSamples → const int