copyWith method

ConfigEntry<T> copyWith({
  1. String? key,
  2. T? value,
  3. ConfigScope? scope,
  4. ConfigSource? source,
  5. String? description,
  6. bool validator(
    1. T
    )?,
})

Return a copy with replaced fields.

Implementation

ConfigEntry<T> copyWith({
  String? key,
  T? value,
  ConfigScope? scope,
  ConfigSource? source,
  String? description,
  bool Function(T)? validator,
}) {
  return ConfigEntry<T>(
    key: key ?? this.key,
    value: value ?? this.value,
    scope: scope ?? this.scope,
    source: source ?? this.source,
    description: description ?? this.description,
    validator: validator ?? this.validator,
  );
}