StudySubject class

Inheritance
Annotations
  • @JsonSerializable()

Constructors

StudySubject(String id, String studyId, String userId, List<String> selectedInterventionIds)
StudySubject.fromJson(Map<String, dynamic> json)
factory
StudySubject.fromStudy(Study study, String userId, List<String> selectedInterventionIds, String? inviteCode)

Properties

completedStudy bool
no setter
daysPerIntervention int
no setter
hashCode int
The hash code for this object.
no setterinherited
id String
getter/setter pair
interventionOrder List<String>
no setter
inviteCode String?
getter/setter pair
minimumStudyLengthCompleted bool
no setter
primaryKeys Map<String, dynamic>
no setteroverride
progress List<SubjectProgress>
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedInterventionIds List<String>
getter/setter pair
selectedInterventions List<Intervention>
no setter
startedAt DateTime?
getter/setter pair
study Study
getter/setter pair
studyId String
getter/setter pair
userId String
getter/setter pair

Methods

addResult<T>({required String taskId, required String periodId, required T result}) Future<void>
allTasksCompletedFor(DateTime dateTime) bool
completedForPhase(int index) int
completedTasksFor(Task task) int
dayAfterEndOfPhase(int index) DateTime
daysLeftForPhase(int index) int
delete() Future<StudySubject>
override
deleteProgress() Future<void>
endDate(DateTime dt) DateTime
getDayOfStudyFor(DateTime date) int
getInterventionForDate(DateTime date) Intervention?
getInterventionIndexForDate(DateTime date) int
getInterventionsInOrder() List<Intervention>
getResultsByDate({required String interventionId}) Map<DateTime, List<SubjectProgress>>
getTaskProgressForDay(String taskId, DateTime dateTime) List<SubjectProgress>
isTaskFinishedForDay(String taskId, DateTime dateTime) bool
isTimedTaskFinished(String taskId, CompletionPeriod completionPeriod, DateTime dateTime) bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
percentCompletedForPhase(int index) double
percentMissedForPhase(int index, DateTime date) double
resultsFor(String taskId) List<SubjectProgress>
save() Future<StudySubject>
override
scheduleFor(DateTime dateTime) List<TimedTask>
setStartDateBackBy({required int days}) Future<void>
startOfPhase(int index) DateTime
toJson() Map<String, dynamic>
override
toString() String
A string representation of this object.
inherited
totalTaskCountFor(Task task) int

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

tableName → const String