copyWith method

TaskElement copyWith({
  1. String? taskDesc,
  2. String? event,
  3. int frequency = 0,
  4. String? logic,
  5. List<Reward>? rewards,
  6. String? status,
  7. dynamic dateCompleted,
  8. dynamic taskId,
})

Implementation

TaskElement copyWith({
  String? taskDesc,
  String? event,
  int frequency = 0,
  String? logic,
  //Conditions? conditions,
  List<Reward>? rewards,
  String? status,
  dynamic dateCompleted,
  dynamic taskId,
}) =>
    TaskElement(
      taskDesc: taskDesc ?? this.taskDesc,
      event: event ?? this.event,
      frequency: frequency ?? this.frequency,
      logic: logic ?? this.logic,
      //conditions: conditions ?? this.conditions,
      rewards: rewards ?? this.rewards,
      status: status ?? this.status,
      dateCompleted: dateCompleted ?? this.dateCompleted,
      taskId: taskId ?? this.taskId,
    );