toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  return {
    'id': id,
    'taskKey': taskKey,
    'name': name,
    'description': description,
    'criteriaType': criteriaType.value,
    'criteriaValue': criteriaValue,
    'xpReward': xpReward,
    'isActive': isActive,
    'currentProgress': currentProgress,
    'isCompleted': isCompleted,
    'isClaimed': isClaimed,
    'completedAt': completedAt?.toIso8601String(),
    'createdAt': createdAt?.toIso8601String(),
  };
}