setConnected method

void setConnected(
  1. int callId,
  2. String from,
  3. String to,
  4. bool hasVideo,
)

Set 'connected' and other attributes of the recent call item specified by callId

Implementation

void setConnected(int callId, String from, String to, bool hasVideo) {
  int index = _cdrItems.indexWhere((c) => c.myCallId==callId);
  if(index == -1) return;

  CdrModel cdr = _cdrItems[index];
  cdr.hasVideo = hasVideo;
  cdr.connected = true;
  notifyListeners();
}