NetworkCapability.fromMap constructor
Creates a NetworkCapability from a map returned by the native platform.
Implementation
factory NetworkCapability.fromMap(Map<Object?, Object?> map) {
return NetworkCapability(
isConnected: _readBool(map, 'isConnected'),
transportType: _readString(map, 'transportType'),
isValidated: _readBool(map, 'isValidated'),
isMetered: _readBool(map, 'isMetered'),
hasVpn: _readBool(map, 'hasVpn'),
hasWifi: _readBool(map, 'hasWifi'),
hasCellular: _readBool(map, 'hasCellular'),
hasEthernet: _readBool(map, 'hasEthernet'),
hasBluetooth: _readBool(map, 'hasBluetooth'),
hasLowLatency: _readBool(map, 'hasLowLatency'),
hasHighBandwidth: _readBool(map, 'hasHighBandwidth'),
);
}