copyWith method

EnumSpec copyWith({
  1. String? name,
  2. List<EnumValueSpec>? values,
  3. String? description,
  4. bool? nullable,
  5. List<Object>? examples,
  6. bool? isDeprecated,
})

Creates a copy with the given modifications.

Implementation

EnumSpec copyWith({
  String? name,
  List<EnumValueSpec>? values,
  String? description,
  bool? nullable,
  List<Object>? examples,
  bool? isDeprecated,
}) =>
    EnumSpec(
      name: name ?? this.name,
      values: values ?? this.values,
      description: description ?? this.description,
      nullable: nullable ?? this.nullable,
      examples: examples ?? this.examples,
      isDeprecated: isDeprecated ?? this.isDeprecated,
    );