MoodleCourse class

A course on Moodle the user is enrolled in.

Annotations

Constructors

MoodleCourse({@JsonKey(name: 'courseid') required int id, @HexColorConverter() required Color color, required String name, required String shortname, @BoolConverter() required bool enabled})
A course on Moodle the user is enrolled in.
const
factory
MoodleCourse.fromJson(Map<String, Object?> json)
Creates a MoodleCourse from a JSON object.
factory
MoodleCourse.skeleton()
Creates a dummy course for skeleton loading.
factory

Properties

color → Color
The color of this course in hexadecimal format.
no setterinherited
copyWith → $MoodleCourseCopyWith<MoodleCourse>
Create a copy of MoodleCourse with the given fields replaced by the non-null parameter values.
no setterinherited
enabled → bool
Whether the user want's the app to track this course.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
id → int
The ID of this course.
no setterinherited
name → String
The name of this course.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
shortname → String
The shortname chosen by the user for this course. Limited to 5 characters.
no setterinherited
url → String
The URL to view this course on Moodle.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Serializes this MoodleCourse to a JSON map.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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