NetworkCapability class

Native Android 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})
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
isConnected bool
Whether Android reports an active connected network.
final
isMetered bool
Whether the active network is metered.
final
isValidated bool
Whether Android 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