getNetworkBandwith static method

Future<Speed?> getNetworkBandwith()

Implementation

static Future<Speed?> getNetworkBandwith() async {
  if (!Platform.isAndroid) {
    print('not Supported');
    return null;
  }
  final mem = await _channel.invokeMethod('getNetworkBandwith');
  final parse = json.decode(mem!);
  return Speed(
    upload: double.parse(parse['up']),
    download: double.parse(parse['down']),
  );
}