ChallengeModel class
Constructors
-
ChallengeModel({String? id, required String name, String? description, required ChallengeType type, required ChallengeStatus status, required DateTime startDate, required DateTime endDate, List<
ChallengeTaskModel> ? tasks, List<ChallengeRewardModel> ? communityRewards, int totalCommunityXp = 0, int participantCount = 0, bool isJoined = false, int userXp = 0, int userRank = 0, DateTime? createdAt, DateTime? updatedAt}) -
ChallengeModel.fromJson(Map<
String, dynamic> json) -
factory
Properties
- box → BoxBase?
-
Get the box in which this object is stored. Returns
nullif object has not been added to a box yet.no setterinherited -
communityRewards
→ List<
ChallengeRewardModel> ? -
final
- createdAt → DateTime?
-
final
- description → String?
-
final
- endDate → DateTime
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String?
-
final
- isInBox → bool
-
Returns whether this object is currently stored in a box.
no setterinherited
- isJoined → bool
-
final
- key → dynamic
-
Get the key associated with this object. Returns
nullif object has not been added to a box yet.no setterinherited - name → String
-
final
- participantCount → int
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- startDate → DateTime
-
final
- status → ChallengeStatus
-
final
-
tasks
→ List<
ChallengeTaskModel> ? -
final
- totalCommunityXp → int
-
final
- type → ChallengeType
-
final
- updatedAt → DateTime?
-
final
- userRank → int
-
final
- userXp → int
-
final
Methods
-
delete(
) → Future< void> -
Deletes this object from the box it is stored in.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
save(
) → Future< void> -
Persists this object.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited