copyWith method

SipCallModel copyWith({
  1. String? id,
  2. String? accountId,
  3. String? number,
  4. String? direction,
  5. String? state,
  6. String? startTime,
  7. String? connectTime,
  8. String? endTime,
  9. bool? isMuted,
  10. bool? isOnHold,
  11. bool? isSpeaker,
  12. String? transferTarget,
  13. String? redirectTarget,
  14. String? callerName,
})

Create a copy with updated fields

Implementation

SipCallModel copyWith({
  String? id,
  String? accountId,
  String? number,
  String? direction,
  String? state,
  String? startTime,
  String? connectTime,
  String? endTime,
  bool? isMuted,
  bool? isOnHold,
  bool? isSpeaker,
  String? transferTarget,
  String? redirectTarget,
  String? callerName,
}) {
  return SipCallModel(
    id: id ?? this.id,
    accountId: accountId ?? this.accountId,
    number: number ?? this.number,
    direction: direction ?? this.direction,
    state: state ?? this.state,
    startTime: startTime ?? this.startTime,
    connectTime: connectTime ?? this.connectTime,
    endTime: endTime ?? this.endTime,
    isMuted: isMuted ?? this.isMuted,
    isOnHold: isOnHold ?? this.isOnHold,
    isSpeaker: isSpeaker ?? this.isSpeaker,
    transferTarget: transferTarget ?? this.transferTarget,
    redirectTarget: redirectTarget ?? this.redirectTarget,
    callerName: callerName ?? this.callerName,
  );
}