copy method

  1. @override
CheckBoxItemOptionModel copy({
  1. String? id,
  2. String? itemId,
  3. String? label,
  4. Option<int>? min,
  5. Option<int>? max,
  6. Iterable<CheckBoxElementModel>? checkboxes,
  7. DateTime? updatedAt,
  8. DateTime? createdAt,
})
override

Implementation

@override
CheckBoxItemOptionModel copy({
  String? id,
  String? itemId,
  String? label,
  Option<int>? min,
  Option<int>? max,
  Iterable<CheckBoxElementModel>? checkboxes,
  DateTime? updatedAt,
  DateTime? createdAt,
}) {
  return CheckBoxItemOptionModel(
    id: id ?? this.id,
    itemId: itemId ?? this.itemId,
    label: label ?? this.label,
    updatedAt: updatedAt ?? this.updatedAt,
    createdAt: createdAt ?? this.createdAt,
    min: min != null ? min.value : this.min,
    max: max != null ? max.value : this.max,
    checkboxes: checkboxes ?? this.checkboxes,
  );
}