primary property

UNetworkType? get primary

The transport carrying traffic; VPN only when it is the sole transport.

Implementation

UNetworkType? get primary {
  for (final UNetworkType t in const <UNetworkType>[
    UNetworkType.ethernet,
    UNetworkType.wifi,
    UNetworkType.cellular,
    UNetworkType.satellite,
    UNetworkType.bluetooth,
    UNetworkType.usb,
    UNetworkType.other,
    UNetworkType.vpn,
  ]) {
    if (types.contains(t)) return t;
  }
  return null;
}