copyWith method
StompConfig
copyWith({
- String? url,
- Duration? reconnectDelay,
- Duration? heartbeatIncoming,
- Duration? heartbeatOutgoing,
- Duration? connectionTimeout,
- bool? useSockJS,
- Map<
String, String> ? stompConnectHeaders, - Map<
String, dynamic> ? webSocketConnectHeaders, - StompBeforeConnectCallback? beforeConnect,
- StompFrameCallback? onConnect,
- StompFrameCallback? onStompError,
- StompFrameCallback? onDisconnect,
- StompFrameCallback? onUnhandledFrame,
- StompFrameCallback? onUnhandledMessage,
- StompFrameCallback? onUnhandledReceipt,
- StompWebSocketErrorCallback? onWebSocketError,
- StompWebSocketDoneCallback? onWebSocketDone,
- StompDebugCallback? onDebugMessage,
Implementation
StompConfig copyWith({
String? url,
Duration? reconnectDelay,
Duration? heartbeatIncoming,
Duration? heartbeatOutgoing,
Duration? connectionTimeout,
bool? useSockJS,
Map<String, String>? stompConnectHeaders,
Map<String, dynamic>? webSocketConnectHeaders,
StompBeforeConnectCallback? beforeConnect,
StompFrameCallback? onConnect,
StompFrameCallback? onStompError,
StompFrameCallback? onDisconnect,
StompFrameCallback? onUnhandledFrame,
StompFrameCallback? onUnhandledMessage,
StompFrameCallback? onUnhandledReceipt,
StompWebSocketErrorCallback? onWebSocketError,
StompWebSocketDoneCallback? onWebSocketDone,
StompDebugCallback? onDebugMessage,
}) {
return StompConfig(
url: url ?? this.url,
reconnectDelay: reconnectDelay ?? this.reconnectDelay,
heartbeatIncoming: heartbeatIncoming ?? this.heartbeatIncoming,
heartbeatOutgoing: heartbeatOutgoing ?? this.heartbeatOutgoing,
connectionTimeout: connectionTimeout ?? this.connectionTimeout,
useSockJS: useSockJS ?? this.useSockJS,
webSocketConnectHeaders:
webSocketConnectHeaders ?? this.webSocketConnectHeaders,
stompConnectHeaders: stompConnectHeaders ?? this.stompConnectHeaders,
beforeConnect: beforeConnect ?? this.beforeConnect,
onConnect: onConnect ?? this.onConnect,
onStompError: onStompError ?? this.onStompError,
onDisconnect: onDisconnect ?? this.onDisconnect,
onUnhandledFrame: onUnhandledFrame ?? this.onUnhandledFrame,
onUnhandledMessage: onUnhandledMessage ?? this.onUnhandledMessage,
onUnhandledReceipt: onUnhandledReceipt ?? this.onUnhandledReceipt,
onWebSocketError: onWebSocketError ?? this.onWebSocketError,
onWebSocketDone: onWebSocketDone ?? this.onWebSocketDone,
onDebugMessage: onDebugMessage ?? this.onDebugMessage,
);
}