NetworkCapability class

Native network capability information for the active network.

Constructors

NetworkCapability({required bool isConnected, required String transportType, required bool isValidated, required bool isMetered, required bool hasVpn, required bool hasWifi, required bool hasCellular, required bool hasEthernet, required bool hasBluetooth, required bool hasLowLatency, required bool hasHighBandwidth, List<String>? interfaceTypes, bool? isConstrained, bool isIosNative = false})
Creates a network capability description.
const
NetworkCapability.fromMap(Map<Object?, Object?> map)
Creates a NetworkCapability from a map returned by the native platform.
factory

Properties

hasBluetooth bool
Whether the active network uses a Bluetooth transport.
final
hasCellular bool
Whether the active network uses a cellular transport.
final
hasEthernet bool
Whether the active network uses an ethernet transport.
final
hashCode int
The hash code for this object.
no setterinherited
hasHighBandwidth bool
Whether the active network reports a high-bandwidth capability.
final
hasLowLatency bool
Whether the active network reports a low-latency capability.
final
hasVpn bool
Whether the active network uses a VPN transport.
final
hasWifi bool
Whether the active network uses a Wi-Fi transport.
final
interfaceTypes List<String>?
Native interface type names when available.
final
isConnected bool
Whether the native platform reports an active connected network.
final
isConstrained bool?
Whether the current network is constrained, such as iOS Low Data Mode.
final
isIosNative bool
Whether this payload came from the iOS native implementation.
final
isMetered bool
Whether the active network is metered.
final
isValidated bool
Whether the native platform has validated internet access on the active network.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
transportType String
A readable active transport type summary.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, Object>
Converts this network capability to a map using the native field names.
toString() String
Returns a readable string containing all network fields.
override

Operators

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