copyWith method
TxServerConfiguration
copyWith({
- String? host,
- int? port,
- String? turn,
- String? stun,
- List<
TxIceServer> ? webRTCIceServers, - 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,
);
}