ChallengeModel constructor

ChallengeModel({
  1. String? id,
  2. required String name,
  3. String? description,
  4. required ChallengeType type,
  5. required ChallengeStatus status,
  6. required DateTime startDate,
  7. required DateTime endDate,
  8. List<ChallengeTaskModel>? tasks,
  9. List<ChallengeRewardModel>? communityRewards,
  10. int totalCommunityXp = 0,
  11. int participantCount = 0,
  12. bool isJoined = false,
  13. int userXp = 0,
  14. int userRank = 0,
  15. DateTime? createdAt,
  16. DateTime? updatedAt,
})

Implementation

ChallengeModel({
  this.id,
  required this.name,
  this.description,
  required this.type,
  required this.status,
  required this.startDate,
  required this.endDate,
  this.tasks,
  this.communityRewards,
  this.totalCommunityXp = 0,
  this.participantCount = 0,
  this.isJoined = false,
  this.userXp = 0,
  this.userRank = 0,
  this.createdAt,
  this.updatedAt,
});