copyWith method

ServerState copyWith({
  1. bool? running,
  2. bool? clientConnected,
  3. WebSocketSink? sink,
})

Implementation

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