isConnected static method

Future<bool> isConnected()

Checks if the device is connected to any network.

Implementation

static Future<bool> isConnected() async {
  final bool? result = await GemKitPlatform.instance
      .getChannel(mapId: -1)
      .invokeMethod<bool>('networkProviderCall',
          jsonEncode(<String, String>{'action': 'isConnected'}));
  return result!;
}