copyWith method

TxServerConfiguration copyWith({
  1. String? host,
  2. int? port,
  3. String? turn,
  4. String? stun,
  5. List<TxIceServer>? webRTCIceServers,
  6. WebRTCEnvironment? environment,
})

Creates a copy of this configuration with the specified changes.

Note: changing environment alone does NOT update webRTCIceServers. If you want environment-appropriate ICE servers, also pass webRTCIceServers explicitly, or construct a fresh instance via TxServerConfiguration.production or TxServerConfiguration.development instead.

Implementation

TxServerConfiguration copyWith({
  String? host,
  int? port,
  String? turn,
  String? stun,
  List<TxIceServer>? webRTCIceServers,
  WebRTCEnvironment? environment,
}) {
  return TxServerConfiguration(
    host: host ?? this.host,
    port: port ?? this.port,
    turn: turn ?? this.turn,
    stun: stun ?? this.stun,
    webRTCIceServers: webRTCIceServers ?? this.webRTCIceServers,
    environment: environment ?? this.environment,
  );
}