copyWith method

ServerConfig copyWith({
  1. ServerType? type,
  2. String? hostname,
  3. int? port,
  4. SocketType? socketType,
  5. Authentication? authentication,
  6. Authentication? authenticationAlternative,
  7. UsernameType? usernameType,
})

Creates a copy of this ServerConfig with the specified values

Implementation

ServerConfig copyWith({
  ServerType? type,
  String? hostname,
  int? port,
  SocketType? socketType,
  Authentication? authentication,
  Authentication? authenticationAlternative,
  UsernameType? usernameType,
}) =>
    ServerConfig(
      type: type ?? this.type,
      hostname: hostname ?? this.hostname,
      port: port ?? this.port,
      socketType: socketType ?? this.socketType,
      authentication: authentication ?? this.authentication,
      authenticationAlternative:
          authenticationAlternative ?? this.authenticationAlternative,
      usernameType: usernameType ?? this.usernameType,
    );