copyWith method

ClockBodyModel copyWith({
  1. DateTime? date,
  2. String? clock,
  3. AttendanceType? type,
  4. String? notes,
  5. double? latitude,
  6. double? longitude,
  7. int? imageId,
  8. String? address,
  9. int? overtimeId,
  10. List<int>? filesId,
  11. WorkingFromType? workingFrom,
})

Creates a new instance of the ClockBodyModel class by copying the existing instance and overriding certain attributes.

The copyWith method allows you to create a new ClockBodyModel instance by providing new values for specific attributes while keeping the rest unchanged.

Implementation

ClockBodyModel copyWith({
  DateTime? date,
  String? clock,
  AttendanceType? type,
  String? notes,
  double? latitude,
  double? longitude,
  int? imageId,
  String? address,
  int? overtimeId,
  List<int>? filesId,
  WorkingFromType? workingFrom,
}) =>
    ClockBodyModel(
      date: date ?? this.date,
      clock: clock ?? this.clock,
      type: type ?? this.type,
      notes: notes ?? this.notes,
      latitude: latitude ?? this.latitude,
      longitude: longitude ?? this.longitude,
      imageId: imageId ?? this.imageId,
      address: address ?? this.address,
      overtimeId: overtimeId ?? this.overtimeId,
      filesId: filesId ?? this.filesId,
      workingFrom: workingFrom ?? this.workingFrom,
    );