isAIFeatureEnabled static method
Future<void>
isAIFeatureEnabled(})
Implementation
static Future<void> isAIFeatureEnabled(String feature,
{required Function(bool isEnabled) onSuccess,
required Function(CometChatException e) onError}) async {
try {
if (feature.isEmpty) {
onError(CometChatException(ErrorCode.errorEmptyFeature,
ErrorMessage.errorEmptyFeature, ErrorMessage.errorEmptyFeature));
} else {
final arguments = {"feature": feature};
final result =
await channel.invokeMethod('isAIFeatureEnabled', arguments);
onSuccess(result);
}
} on PlatformException catch (p) {
_errorCallbackHandler(null, p, null, onError);
} catch (e) {
_errorCallbackHandler(null, null, e, onError);
}
}