lb_planner library

Classes

AnimationStagger
A utility class that manages staggered animations by incrementing durations.
ApiService
Service for making requests a moodle web service.
AppLocalizations
Callers can lookup localized strings with an instance of AppLocalizations returned by AppLocalizations.of(context).
AppModule
Root module of the application.
AuthGuard
Guard that checks if the user is authenticated.
AuthModule
Handles the authentication of users.
AuthRepository
UI state controller for authentication.
AuthService
Service for authenticating users.
BarChart
Base class for all bar chart widgets.
BoolConverter
Implements serialization and deserialization for bool from bool and int and converts it to an int.
BoolConverterNullable
Implements serialization and deserialization for bool from bool and int and converts it to an int.
BurndownChart
Renders a burndown chart of the user's tasks.
CalendarCourseTasksOverview
Modules overview of a course.
CalendarModule
Module implementing the app's calendar feature.
CalendarPlan
A plan of when to to which MoodleTasks.
CalendarPlanRepository
Repository for managing a user's CalendarPlan.
CalendarScreen
Renders the UI of the calendar feature.
CalendarScreenState
State of the CalendarScreen.
CalendarTasksOverviewCell
Cell for the modules overview.
CalendarTasksOverviewMonthHeader
Month header
CapabilityGuard
Guard that checks if the user has the required capabilities.
Chart
Base class for all chart widgets.
ChartValue
Holds the data for a single value represented in a Chart.
ConditionalWrapper
A widget that conditionally wraps its child with a wrapper widget. If condition is false, just the child will be returned.
ContextColorMapper
A ColorMapper that uses the current context to resolve colors based on the active theme. Used in SvgUtils.themed to resolve colors in SVG images.
CourseCustomizer
Color Picker for choosing course color.
CourseOverviewCourse
A course tile for the course overview screen.
CourseOverviewModule
Module implementing the app's course overview feature.
CourseOverviewScreen
Displays an overview of all tasks for a course.
CourseSelectionScreen
Prompts the user to select courses to include in the planning process.
CourseSelector
Displays a form where the user can search for courses and enable/disable them.
CoursesOverviewScreen
Displays an overview of all courses.
CourseStatsRepository
Repository responsible for providing statistics on a per-course basis.
CourseTag
Displays the shortname of the given course in a colored tag.
CourseToSlot
Maps a MoodleCourse to a Slot.
CourseWidget
Renders a given MoodleCourse as a widget.
DashboardModule
Module implementing the dashboard feature.
DashboardScreen
Renders the dashboard screen.
DeadlinesDatasource
Data source for managing PlanDeadlines.
DeclarativeEdgeInsets
Base class for declarative padding.
DesktopGuard
Ensures that the user is on a desktop device.
DestructiveDialogAction
Represents a destructive action that can be taken in a dialog.
DialogAction
Represents an action that can be taken in a dialog.
EchidnaUserRepository
User ID repository for the echidna package.
EditSlotDialog
A dialog for editing or creating a slot. Edits a slot if slot is provided and creates a new slot if weekday is provided.
Exams
Displays the user's upcoming exams.
FeedbackWidget
A widget that allows users to send feedback to the developers.
GeneralSettings
Displays the general settings of the app.
GenericDialog
A generic dialog that can be used to display information to the user.
GlobalStatsRepository
Repository responsible for providing global statistics for all tasks.
HasCoursesGuard
Guard that checks if the user has any courses enabled. Redirects to the course selection screen per default if no courses are enabled.
HexColorConverter
Implements serialization and deserialization for Color from and to String.
HorizontalBarChart
A horizontal BarChart widget.
HoverableWidget
Base class for all HoverableWidgets.
HoverBuilder
A builder to adapt to the widget being hoverd or not.
ImageMessage
A widget that displays an image with a message below.
InitialRouterOutlet
A widget that wraps a RouterOutlet with the ability to activate a child route on default.
InsuffcientPermissionsReason
If AuthException.reason is InsuffcientPermissionsReason, the user does not have the required permissions to use the webservice and thus is not allowed to authenticate.
InvitableMemberWidget
Renders a user that can be invited to a plan.
InvitesDatasource
Data source for managing PlanInvites.
InvitesRepository
Holds all invites for the current user
LoginForm
A form prompting the user to input their credentials.
LoginScreen
Presents an authentication form to the user.
MobileScreen
Displays a warning for mobile users.
MoodleCourse
A course on Moodle the user is enrolled in.
MoodleCourseDatasource
Datasource for fetching course data.
MoodleCoursesRepository
Repository for managing a user's MoodleCourses.
MoodleModule
Module handling communication with the Moodle API.
MoodleTask
A task that is part of a MoodleCourse.
MoodleTaskDatasource
Datasource for fetching task data.
MoodleTasksRepository
Provides all tasks from Moodle with the latest updates.
MoodleTaskWidget
Renders the given task.
NotFoundScreen
Displays a 404 error message.
Notification
A notification users receive.
NotificationsDatasource
Fetches the user's notifications.
NotificationsList
Displays all notifications of the user.
NotificationsModule
Module responsible for the notifications feature.
NotificationsRepository
UI state control for notifications.
NotificationWidget
Renders a given notification.
NumberSpinner<T extends num>
A spinner widget that allows the user to increment or decrement a number.
OffsetOnHover
Offsets the child to the given offset when hovered.
OverdueTasks
Displays the user's tasks scheduled for today.
PaddingAll
Padding for all sides of a child.
PaddingBottom
Bottom padding for a child.
PaddingHorizontal
Horizontal padding for a child.
PaddingLeft
Left padding for a child.
PaddingRight
Right padding for a child.
PaddingTop
Top padding for a child.
PaddingVertical
Vertical padding for a child.
PlanCell
A cell in the plan grid.
PlanDatasource
Data source for managing a user's CalendarPlan.
PlanDeadline
A deadline for a MoodleTask in a CalendarPlan.
PlanInvite
An invitation to a CalendarPlan.
PlanInviteMemberDialog
Dialog to invite a user to the current user's plan.
PlanMember
A member of a CalendarPlan.
PlanMemberWidget
Renders a single member of a plan.
PlanPopup
Plan management popup.
PlanPopupMembers
Members tab in the plan popup
PlanPopupTasks
Tasks tab in the PlanPopup.
PlanScreen
Displays a calendar view and allows the user to plan their tasks.
PrimaryDialogAction
Represents a primary action that can be taken in a dialog.
Reservation
A reservation for a Slot.
ReservationDateTimeConverter
Converts a DateTime to a string in the format 'yyyy-MM-dd' and vice versa.
ReservedSlots
Displays the user's reserved slots for today.
ScaleOnHover
Scales the child to the given scale when hovered.
SecondaryDialogAction
Represents a secondary action that can be taken in a dialog.
SettingsModule
Module implementing the settings screen.
SettingsScreen
Renders the settings screen.
Navigation sidebar for the application.
SidebarScreen
A screen that wraps its children in a Sidebar.
SidebarTarget
A target in the Sidebar that navigates to a specific route.
Slot
A reservable slot in the school's timetable.
SlotDetailsScreen
Displays the details of a slot.
SlotMasterCoursesRepository
Provides all courses for the entire moodle instance to the slot master.
SlotMasterScreen
A screen for managing slots.
SlotMasterSlotsRepository
Provides data for the slot master screen.
SlotMasterWidget
Displays the details of a slot created by the slot master.
SlotOverviewScreen
Displays an overview of all slots for a supervisor.
SlotOverviewWidget
Displays details of a slot in a compact form for a supervisor.
SlotReservationScreen
A screen for reserving slots.
SlotsDatasource
Datasource mapping the slots endpoints.
SlotsModule
Implements the slot reservation feature.
SlotsRepository
Holds all slots the current user can reserve.
SlotWidget
A widget that displays a Slot.
Spacing
A utility class for creating consistent spacing throughout your Flutter app.
StatisticsModule
Module responsible for the statistics feature.
StatusAggregate
Aggregate of a set of tasks by MoodleTask.status.
StatusOverview
Displays a chart overview of the user's tasks status.
SupervisorSlotsRepository
Provides data for the supervisor slots screen.
TaskAggregate
Aggregation of a set of MoodleTasks for each property relevant to statistics.
TasksOverviewScreen
Displays the monthly distribution of tasks.
TaskStatusTheme
Theme extension for MoodleTask.status.
ThemeBase
Contains some basic information about a theme which is later used to generate a fully fledged theme.
ThemeGeneratorService<Theme>
A service that generates a theme of type Theme based on a ThemeBase.
ThemePreview
Renders a preview of a ThemeBase and sets it as the user's theme when tapped.
ThemeRepository
A repository that manages the current theme.
ThemesDatasource
A datasource providing all available themes.
ThemesSettings
A section of the settings screen that allows the user to change the app's theme.
ThemingModule
Module that provides theming-related services.
TitleBar
A bar displaying the current route's title and the current user's name and profile picture.
TitleBarState
The state of the current route's title bar.
TodaysTasks
Displays the user's tasks scheduled for today.
Token
A token to authenticate with a Webservice.
TransformOnHover
Transforms the child to the given transform when hovered.
TypeAggregate
Aggregate of a set of tasks by MoodleTask.type.
UnixTimestampConverter
Implements serialization and deserialization for DateTime from and to int.
UnixTimestampConverterNullable
Implements serialization and deserialization for DateTime from and to int.
User
A user using the application.
UserDatasource
Datasource for fetching user data.
UserProfileImage
Renders a user's profile image.
UserRepository
UI state controller for the current user.
UsersRepository
Holds all users of the application.
UserWidget
Displays the user's profile image and name.
VerticalBarChart
A vertical BarChart widget.

Enums

CalendarScreenTab
The tabs of the calendar screen.
FeedbackType
The type of feedback that can be sent.
MoodleTaskStatus
The status of a MoodleTask.
MoodleTaskType
The type of a MoodleTask.
MoodleTaskWidgetDisplayMode
Display mode for MoodleTaskWidget.
NotificationType
The type of a Notification.
PlanInviteStatus
The status of a PlanInvite.
PlanMemberAccessType
The access type of a member in a plan.
SlotTimeUnit
A time unit as defined in lb_planner_plugin
UserCapability
Represents the different capabilities a user can possess within the application.
Vintage
Represents a "Jahrgang" (grade level or class year) in a high school context. Used to denote the year group (or class) of students within a high school.
Webservice
An API endpoint exposed by a moodle plugin.
Weekday
The weekday of a Slot.

Extensions

ActiveExt on IModularNavigator
Extension to add a method to check if a route is active.
AnimateUtils on List<Widget>
Adds default animation to a list of widgets.
AnimateX on Widget
Adds default animation to a widget.
ApiServiceResponseUtils on Either<List<JSON>, JSON>
Utility functions for Either<List<JSON>, JSON>.
ButtonUtils on CircularProgressIndicator
Provides button extensions on CircularProgressIndicator.
ContextUtils on BuildContext
Adds a AppLocalizations getter to BuildContext.
FilterUserX on Iterable<User>
Extension methods for filtering users.
IconButtonX on IconButton
Adds utility methods to IconButton.
InsertExt on Iterable<T>
Extension to add functionality for inserting an element between each pair of elements in an Iterable.
NumUtils on num
Utils for numbers.
QueryX on Iterable<Slot>
Adds a query method to the Slot iterable.
ShimmerX on Widget
Adds shimmer animation to a widget.
SpaceExt on List<Widget>
Extension to add spacing functionality for a list of widgets.
SpacingDoubleExt on double
Provides a set of utility methods to work with spacing in a more expressive way. e.g. 10.5.spacing instead of SizedBox(width: 10.5, height: 10.5)
SpacingIntExt on int
Provides a set of utility methods to work with spacing in a more expressive way. e.g. 10.spacing instead of SizedBox(width: 10, height: 10)
StatefulPostframe on State<StatefulWidget>
Provides a less verbose way to add a post-frame callback to a State.
StatelessPostframe on StatelessWidget
Provides a less verbose way to add a post-frame callback to a StatelessWidget.
StateUtils on State<StatefulWidget>
Adds a AppLocalizations getter to State.
StringTextExt on String
Provides a set of utility methods to work with text in a more expressive way.
SvgUtils on SvgGenImage
Utility class for theming SVG images.
TasksFilterX on Iterable<MoodleTask>
Extension methods for filtering tasks.
TextExt on Text
Provides a set of utility methods to work with text in a more expressive way.
ThemeUtils on ThemeData
Adds a TaskStatusTheme getter to ThemeData.
TokenExt on Set<Token>
Utility functions for Token sets.
UserCapabilitiesExtension on Iterable<UserCapability>
Provides helper methods for List<UserCapability>.
UserCapabilityExtension on UserCapability
Provides helper methods for UserCapability.
WidgetExt on Widget
Provides generic widget utilities.

Constants

kDefaultHoverCursor → const SystemMouseCursor
The default cursor used when hovering over a widget.

Properties

defaultTransition → CustomTransition
The default page transition for the application.
final
kRouteObserver RouteObserver<Route>
Global route observer for the application.
final

Functions

captureEvent(String eventName, {Map<String, Object>? properties}) Future<void>
Captures a posthog event.
inviteAcceptedMessage(BuildContext context, Notification notification) Widget
Message builder for NotificationType.inviteAccepted.
inviteActions(BuildContext context, Notification notification) FutureOr<List<(String, FutureOr<void> Function()?)>>
Actions builder for NotificationType.invite.
inviteDeclinedMessage(BuildContext context, Notification notification) Widget
Message builder for NotificationType.inviteDeclined.
inviteMessage(BuildContext context, Notification notification) Widget
Message builder for NotificationType.invite.
lookupAppLocalizations(Locale locale) AppLocalizations
newUserMessage(BuildContext context, Notification notification) Widget
Message builder for NotificationType.newUser.
noActions(BuildContext context, Notification notification) FutureOr<List<(String, FutureOr<void> Function())>>
Actions builder for types that have no actions.
planLeftMessage(BuildContext context, Notification notification) Widget
Message builder for NotificationType.planLeft.
planRemovedMessage(BuildContext context, Notification notification) Widget
Message builder for NotificationType.planRemoved.
showAlertDialog(BuildContext context, {required String title, required String message, String? confirmLabel}) Future<void>
Shows an alert dialog with the given title and message to the user. The dialog will have an OK button to dismiss it.
showAnimatedDialog<T>({required BuildContext context, required RoutePageBuilder pageBuilder}) Future<T?>
Shows a dialog with default animations.
showConfirmationDialog(BuildContext context, {required String title, required String message, String? confirmLabel, String? cancelLabel}) Future<bool>
Shows a confirmation dialog with the given title and message to the user.
showGenericDialog<T>(BuildContext context, {required String title, required Widget content, List<DialogAction>? actions, bool shrinkWrap = true, bool shrinkWrapWidth = false}) Future<T?>
Shows a GenericDialog with the given title and content to the user.
showMarkdownDialog(BuildContext context, {required String title, required String markdown, String? confirmLabel}) Future<void>
Shows an alert dialog but with a markdown body.
squircle({BorderSide side = BorderSide.none, double radius = 10, bool topLeft = true, bool topRight = true, bool bottomLeft = true, bool bottomRight = true, bool left = true, bool right = true, bool top = true, bool bottom = true, BorderAlign borderAlign = BorderAlign.inside}) → SmoothRectangleBorder
Creates a squircle border with the given radius.

Typedefs

TitleBuilder = (String, int?) Function(BuildContext context)
Returns a record of the current route's localized title and it's feature id.`
Translator = String Function(BuildContext context)
A function that returns a translated string based on the BuildContext.

Exceptions / Errors

ApiServiceException
An exception thrown when ApiService.callFunction fails.
AuthException
An exception thrown when AuthService.authenticate fails.