isConnected property

Future<bool?> isConnected

Implementation

Future<bool?> get isConnected async {
  try {
    return await _channel.invokeMethod<bool>("isConnected");
  } on PlatformException catch (ex) {
    print("Platform Error: ${ex.message}");
    return Future.error(ex.message!);
  } on Exception catch (ex) {
    print("Error: ${ex.toString()}");
    return Future.error(ex.toString());
  }
}