User class
Constructors
- User({required InstituteIdentifier instituteId})
- Creates a new instance of User.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
institute
→ Future<
String> -
Returns institute's name.
no setter
- instituteId → InstituteIdentifier
-
The institute's identifier (e.g. 'uom').
final
-
isTokenExpired
→ Future<
bool> -
Checks if
_token
is expired.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getAnnouncements(
{required String courseId}) → Future< List< Announcement> > - Returns a list of Course's announcements. Requires that the User is logged in.
-
getCourses(
) → Future< List< Course> > - If User is logged in, it returns a list of User's registered courses, otherwise, it returns a list of the available courses in the platform (opencourses).
-
getInfo(
) → Future< Identity> -
Returns information about the institute such as the
Institute.name
and theInstitute.url
. -
getMessages(
) → Future< List< Message> > - Returns a list of User's messages.
-
getPortfolio(
) → Future< Portfolio> - Returns a list of User's registered courses along with their profile tools.
-
getTools(
{required String courseId}) → Future< List< Tool> > - Returns the Course tools for a specific Course (i.e. the left menu). It works in the same way as the regular menu, i.e. if the User logged in is an instructor it returns 2 additional groups of tools (inactive and management).
-
login(
{required String username, required String password}) → Future< void> -
Gets User's
_token
and saves it as a parameter inside the class instance for later use. -
logout(
) → Future< void> - Session destruction and logout.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited