copyWith method

SessionModel copyWith({
  1. int? sessionId,
  2. bool? holdState,
  3. bool? sessionState,
  4. bool? conferenceState,
  5. bool? recvCallState,
  6. bool? isReferCall,
  7. int? originCallSessionId,
  8. bool? existEarlyMedia,
  9. bool? videoState,
})

Creates a copy of this session with the specified fields updated.

Any field not specified will retain its current value. Returns a new SessionModel instance with the updated values.

Implementation

SessionModel copyWith({
  int? sessionId,
  bool? holdState,
  bool? sessionState,
  bool? conferenceState,
  bool? recvCallState,
  bool? isReferCall,
  int? originCallSessionId,
  bool? existEarlyMedia,
  bool? videoState,
}) {
  return SessionModel(
    sessionId: sessionId ?? this.sessionId,
    holdState: holdState ?? this.holdState,
    sessionState: sessionState ?? this.sessionState,
    conferenceState: conferenceState ?? this.conferenceState,
    recvCallState: recvCallState ?? this.recvCallState,
    isReferCall: isReferCall ?? this.isReferCall,
    originCallSessionId: originCallSessionId ?? this.originCallSessionId,
    existEarlyMedia: existEarlyMedia ?? this.existEarlyMedia,
    videoState: videoState ?? this.videoState,
  );
}