setNetType method

Future<bool> setNetType(
  1. String netType
)

设置网络状态 netType 2G、3G、4G、5G、WiFi

Implementation

Future<bool> setNetType(String netType) async {
  if (!_supportPlatform || !isInitialize) return false;
  final bool? state =
      await _channel.invokeMethod<bool>('setNetType', netType);
  return state ?? false;
}