copyWith method

NumberSpec copyWith({
  1. bool? isInteger,
  2. num? minimum,
  3. num? maximum,
  4. bool? exclusiveMinimum,
  5. bool? exclusiveMaximum,
  6. num? multipleOf,
  7. num? defaultValue,
  8. String? description,
  9. bool? nullable,
  10. List<Object>? examples,
  11. bool? isDeprecated,
})

Creates a copy with the given modifications.

Implementation

NumberSpec copyWith({
  bool? isInteger,
  num? minimum,
  num? maximum,
  bool? exclusiveMinimum,
  bool? exclusiveMaximum,
  num? multipleOf,
  num? defaultValue,
  String? description,
  bool? nullable,
  List<Object>? examples,
  bool? isDeprecated,
}) =>
    NumberSpec(
      isInteger: isInteger ?? this.isInteger,
      minimum: minimum ?? this.minimum,
      maximum: maximum ?? this.maximum,
      exclusiveMinimum: exclusiveMinimum ?? this.exclusiveMinimum,
      exclusiveMaximum: exclusiveMaximum ?? this.exclusiveMaximum,
      multipleOf: multipleOf ?? this.multipleOf,
      defaultValue: defaultValue ?? this.defaultValue,
      description: description ?? this.description,
      nullable: nullable ?? this.nullable,
      examples: examples ?? this.examples,
      isDeprecated: isDeprecated ?? this.isDeprecated,
    );