isExtensionEnabled static method

Future<bool> isExtensionEnabled(
  1. String extensionId, {
  2. dynamic onSuccess(
    1. bool
    )?,
  3. dynamic onError(
    1. CometChatException excep
    )?,
})

Implementation

static Future<bool> isExtensionEnabled(String extensionId,
    {Function(bool)? onSuccess,
    Function(CometChatException excep)? onError}) async {
  try {
    final result = await channel
        .invokeMethod('isExtensionEnabled', {"extensionId": extensionId});
    if (onSuccess != null) onSuccess(result as bool);
    return result as bool;
  } on PlatformException catch (p) {
    _errorCallbackHandler(null, p, null, onError);
  } catch (e) {
    _errorCallbackHandler(null, null, e, onError);
  }
  return false;
}