copyWith method

KeyValue copyWith({
  1. String? name,
  2. List<String>? comments,
  3. String? type,
  4. Object? value,
  5. bool? nullable,
})

Implementation

KeyValue copyWith({
  String? name,
  List<String>? comments,
  String? type,
  Object? value,
  bool? nullable,
}) {
  return KeyValue(
    name: name ?? this.name,
    type: type ?? this.type,
    value: value ?? this.value,
    comments: comments ?? List.from(this.comments),
    nullable: nullable ?? this.nullable,
  );
}