copyWith method

PropertySpec copyWith({
  1. String? name,
  2. String? jsonName,
  3. TypeSpec? type,
  4. bool? required,
})

Creates a copy with the given modifications.

Implementation

PropertySpec copyWith({
  String? name,
  String? jsonName,
  TypeSpec? type,
  bool? required,
}) =>
    PropertySpec(
      name: name ?? this.name,
      jsonName: jsonName ?? this.jsonName,
      type: type ?? this.type,
      required: required ?? this.required,
    );