copyWith method
Implementation
ServerState copyWith({
bool? running,
bool? clientConnected,
WebSocketSink? sink,
}) {
return ServerState(
running: running ?? this.running,
clientConnected: clientConnected ?? this.clientConnected,
sink: sink ?? this.sink,
);
}