copyWith method

ArraySpec copyWith({
  1. TypeSpec? items,
  2. int? minItems,
  3. int? maxItems,
  4. bool? uniqueItems,
  5. List<Object>? defaultValue,
  6. String? description,
  7. bool? nullable,
  8. List<Object>? examples,
  9. bool? isDeprecated,
})

Creates a copy with the given modifications.

Implementation

ArraySpec copyWith({
  TypeSpec? items,
  int? minItems,
  int? maxItems,
  bool? uniqueItems,
  List<Object>? defaultValue,
  String? description,
  bool? nullable,
  List<Object>? examples,
  bool? isDeprecated,
}) =>
    ArraySpec(
      items: items ?? this.items,
      minItems: minItems ?? this.minItems,
      maxItems: maxItems ?? this.maxItems,
      uniqueItems: uniqueItems ?? this.uniqueItems,
      defaultValue: defaultValue ?? this.defaultValue,
      description: description ?? this.description,
      nullable: nullable ?? this.nullable,
      examples: examples ?? this.examples,
      isDeprecated: isDeprecated ?? this.isDeprecated,
    );