ping static method

Future<void> ping({
  1. required Function? onSuccess,
  2. required dynamic onError(
    1. CometChatException e
    )?,
})

Implementation

static Future<void> ping(
    {required Function? onSuccess,
    required Function(CometChatException e)? onError}) async {
  try {
    await channel.invokeMethod('ping', null);
    if (onSuccess != null) onSuccess();
  } on PlatformException catch (p) {
    _errorCallbackHandler(null, p, null, onError);
  } catch (e) {
    _errorCallbackHandler(null, null, e, onError);
  }
}