NtutPortalService class

Implemented types

Constructors

NtutPortalService({Dio? dio, Duration? iSchoolSsoTimeout})

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

changePassword({required String newPassword, String? currentPassword, bool isExpired = false}) → Future<void>
If isExpired is true, it changes an expired password (using the expired/first-time login session). Otherwise, it performs a normal password change (from settings) and requires currentPassword.
override
getApplicationCatalog() → Future<List<PortalApplicationCategoryDto>>
Fetches every application category and browser-openable application available to the current portal account in Chinese and English.
override
getAvatar([String? filename]) → Future<Uint8List>
Downloads a user's avatar from NTUT Portal.
override
getCalendar(DateTime startDate, DateTime endDate) → Future<List<CalendarEventDto>>
Fetches academic calendar events within a date range.
override
getSsoUrl(String serviceCode) → Future<Uri>
Returns a URL that authenticates the user with a target NTUT service via OAuth2 authorization code.
override
login(String username, String password) → Future<UserDto>
Authenticates a user with NTUT Portal credentials.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sso(String serviceCode) → Future<void>
Performs single sign-on (SSO) to authenticate with a target NTUT service.
override
toString() → String
A string representation of this object.
inherited
uploadAvatar(Uint8List imageBytes, String? oldFilename) → Future<String>
Uploads a new profile photo to NTUT Portal, replacing the current one.
override

Operators

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