replace method

PgEndpoint replace({
  1. String? host,
  2. int? port,
  3. String? database,
  4. String? username,
  5. String? password,
  6. bool? requireSsl,
})

Creates a new PgEndpoint by replacing the current values with non-null parameters.

Parameters with null values are ignored (keeping current value).

Implementation

PgEndpoint replace({
  String? host,
  int? port,
  String? database,
  String? username,
  String? password,
  bool? requireSsl,
}) {
  return PgEndpoint(
    host: host ?? this.host,
    port: port ?? this.port,
    database: database ?? this.database,
    username: username ?? this.username,
    password: password ?? this.password,
    requireSsl: requireSsl ?? this.requireSsl,
  );
}