MoodleCourse constructor

const MoodleCourse({
  1. @JsonKey(name: 'courseid') required int id,
  2. @HexColorConverter() required Color color,
  3. required String name,
  4. required String shortname,
  5. @BoolConverter() required bool enabled,
})

A course on Moodle the user is enrolled in.

Implementation

const factory MoodleCourse({
  /// The ID of this course.
  @JsonKey(name: 'courseid') required int id,

  /// The color of this course in hexadecimal format.
  @HexColorConverter() required Color color,

  /// The name of this course.
  required String name,

  /// The shortname chosen by the user for this course.
  /// Limited to 5 characters.
  required String shortname,

  /// Whether the user want's the app to track this course.
  @BoolConverter() required bool enabled,
}) = _MoodleCourse;