callExperimentalAPI method
Implementation
@override
Future<TencentCloudChatPushResult> callExperimentalAPI({
required String api,
Object? param,
}) async {
try {
if (Platform.isIOS || Platform.isAndroid) {
final res = await _methodChannel.invokeMethod("callExperimentalAPI", {
"api": api,
"param": param,
});
return TencentCloudChatPushResult(code: 0, data: res);
}
return TencentCloudChatPushResult(code: -1);
} on PlatformException catch (e) {
return TencentCloudChatPushResult(
code: int.tryParse(e.code) ?? -1,
errorMessage: e.message,
);
}
}