dataNetworkType property
Future<NetworkType>
get
dataNetworkType
Returns a constant indicating the radio technology (network type) currently in use on the device for data transmission.
Requires READ_PHONE_STATE permission.
Implementation
Future<NetworkType> get dataNetworkType async {
final int? type =
await _foregroundChannel.invokeMethod<int>(GET_DATA_NETWORK_TYPE);
if (type != null) {
return NetworkType.values[type];
} else {
return NetworkType.UNKNOWN;
}
}