copyWith method
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,
);
}