copyWith method Null safety

FieldData copyWith(
  1. {String? id,
  2. DateTime? created,
  3. DateTime? updated,
  4. FieldType? type,
  5. String? name,
  6. bool? system,
  7. bool? required,
  8. bool? unique,
  9. String? collectionId,
  10. String? extra}
)

Implementation

FieldData copyWith(
        {String? id,
        DateTime? created,
        DateTime? updated,
        FieldType? type,
        String? name,
        bool? system,
        bool? required,
        bool? unique,
        String? collectionId,
        String? extra}) =>
    FieldData(
      id: id ?? this.id,
      created: created ?? this.created,
      updated: updated ?? this.updated,
      type: type ?? this.type,
      name: name ?? this.name,
      system: system ?? this.system,
      required: required ?? this.required,
      unique: unique ?? this.unique,
      collectionId: collectionId ?? this.collectionId,
      extra: extra ?? this.extra,
    );