MoodleTask constructor
- @JsonKey(name: 'moduleid') required int id,
- required String name,
- @JsonKey(name: 'courseid') required int courseId,
- required MoodleTaskStatus status,
- required MoodleTaskType type,
- @UnixTimestampConverter() required DateTime? deadline,
- required String url,
A task that is part of a MoodleCourse.
Implementation
const factory MoodleTask({
/// The ID of this task.
@JsonKey(name: 'moduleid') required int id,
/// The name of this task.
required String name,
/// The ID of the [MoodleCourse] this task is part of.
@JsonKey(name: 'courseid') required int courseId,
/// The status of this task.
required MoodleTaskStatus status,
/// The type of this task.
required MoodleTaskType type,
/// The timestamp of when this task is due in seconds since the Unix epoch.
@UnixTimestampConverter() required DateTime? deadline,
/// The URL to this task on the Moodle website.
required String url,
}) = _MoodleTask;