isExtensionEnabled static method
Future<bool>
isExtensionEnabled(
- String extensionId, {
- dynamic onSuccess()?,
- dynamic onError(
- 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;
}