onConnected method

void onConnected(
  1. int callId,
  2. String from,
  3. String to,
  4. bool withVideo,
)

Handles 2xx responses raised by library and route it to matched call instance

Implementation

void onConnected(int callId, String from, String to, bool withVideo) {
  _logs?.print('onConnected callId:$callId from:$from to:$to withVideo:$withVideo');
  _cdrs?.setConnected(callId, from, to, withVideo);

  int index = _callItems.indexWhere((c) => c.myCallId==callId);
  if(index != -1) _callItems[index].onConnected(from, to, withVideo);
  notifyListeners();
}