-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ List of session now generated on runtime
No need to hardcoded the session manually and publish a new update everytime
- Loading branch information
Showing
4 changed files
with
60 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
class AcademicSession { | ||
/// Returns a list of academic sessions. Replace previous implementation | ||
/// using hardcoded constants [kSessions] | ||
/// | ||
/// Eg: ['2023/2024', '2024/2025'] | ||
static List<String> get session { | ||
var yearNow = DateTime.now().year; | ||
|
||
return [ | ||
'${yearNow - 1}/$yearNow', | ||
'$yearNow/${yearNow + 1}', | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters