IConnectivityManager class abstract interface

Interface for comprehensive connectivity management

Implementers

Properties

connectionSpeed ConnectionSpeed
Current connection speed estimate
no setter
currentState ConnectivityState
Current connectivity state
no setter
hashCode int
The hash code for this object.
no setterinherited
hasInternetAccess bool
Whether the device has internet access
no setter
hasNetworkConnection bool
Whether the device has any network connection
no setter
isMeteredConnection bool
Whether the connection is metered (mobile data)
no setter
isOffline bool
Whether the device is completely offline
no setter
onConnectivityChanged Stream<ConnectivityState>
Stream of connectivity state changes
no setter
onInternetAvailabilityChanged Stream<bool>
Stream of internet availability changes (true/false)
no setter
onNetworkTypeChanged Stream<List<ConnectivityResult>>
Stream of network type changes
no setter
primaryConnectionType → ConnectivityResult
The primary connection type
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

canHandleBandwidthIntensiveOperations() Future<bool>
Check if the connection can handle bandwidth-intensive operations
checkConnectivity() Future<ConnectivityState>
Check current connectivity status manually
dispose() Future<void>
Dispose of resources
getConnectionQualityScore() Future<double>
Get connection quality score (0.0 to 1.0)
getNetworkInfo() Future<Map<String, dynamic>>
Get detailed network information
initialize(ConnectivityConfig config) Future<void>
Initialize the connectivity manager with configuration
isUrlReachable(String url, {Duration? timeout, int? maxAttempts}) Future<bool>
Check if a specific URL is reachable
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pauseMonitoring() Future<void>
Pause connectivity monitoring (e.g., when app goes to background)
ping(String host, {Duration? timeout, int? maxAttempts}) Future<Duration?>
Ping a specific host
reset() Future<void>
Reset connectivity state and restart monitoring
resumeMonitoring() Future<void>
Resume connectivity monitoring (e.g., when app comes to foreground)
startMonitoring() Future<void>
Start monitoring connectivity changes
stopMonitoring() Future<void>
Stop monitoring connectivity changes
testConnectionSpeed({String? testUrl, Duration? timeout}) Future<ConnectionSpeed>
Test connection speed
testInternetAccess({List<String>? testUrls, Duration? timeout, int? maxRetries}) Future<bool>
Test internet accessibility with custom options
toString() String
A string representation of this object.
inherited
waitForConnection({Duration? timeout, Duration? checkInterval}) Future<bool>
Wait for internet connection with timeout
waitForConnectionType(ConnectivityResult connectionType, {Duration? timeout, Duration? checkInterval}) Future<bool>
Wait for specific connection type

Operators

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