callCancel method
Implementation
Future<Map<dynamic, dynamic>> callCancel(
dynamic invitees, String callID, dynamic config) async {
Object _config = mapToJSObj(config);
final result = await promiseToFuture(
ZIM.getInstance()!.callCancel(invitees, callID, _config))
.catchError((e) {
throw PlatformException(code: e.code.toString(), message: e.message);
});
Map _resultMap = jsObjectToMap(result);
Map resultMap = {
'callID': _resultMap['callID'],
'info': {'timeout': _resultMap['timeout'], 'errorInvitees': []}
};
_resultMap['errorInvitees'].forEach((invite) {
resultMap['info']['errorInvitees'].add({
'userID': invite['userID'],
'state': invite['state'] is int ? invite['state'] : invite['userState']
});
});
return resultMap;
}