implemented RMV commute integration in the timetable, added Nominatim geocoding for home station lookup, created CommuteCubit for daily trip management with TTL caching, and introduced specialized timetable tiles, detail sheets, and settings for transit connections and walking buffers
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import '../../../../api/connect/rmv/rmv_models.dart';
|
||||
import '../../../../api/mhsl/custom_timetable_event/custom_timetable_event.dart';
|
||||
import '../../../../api/webuntis/queries/get_timetable/get_timetable_response.dart';
|
||||
import 'commute_direction.dart';
|
||||
|
||||
sealed class ArbitraryAppointment {
|
||||
const ArbitraryAppointment();
|
||||
@@ -7,9 +9,12 @@ sealed class ArbitraryAppointment {
|
||||
T when<T>({
|
||||
required T Function(GetTimetableResponseObject lesson) webuntis,
|
||||
required T Function(CustomTimetableEvent event) custom,
|
||||
required T Function(Trip trip, CommuteDirection direction) commute,
|
||||
}) => switch (this) {
|
||||
WebuntisAppointment(:final lesson) => webuntis(lesson),
|
||||
CustomAppointment(:final event) => custom(event),
|
||||
CommuteAppointment(:final trip, :final direction) =>
|
||||
commute(trip, direction),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -22,3 +27,9 @@ class CustomAppointment extends ArbitraryAppointment {
|
||||
final CustomTimetableEvent event;
|
||||
const CustomAppointment(this.event);
|
||||
}
|
||||
|
||||
class CommuteAppointment extends ArbitraryAppointment {
|
||||
final Trip trip;
|
||||
final CommuteDirection direction;
|
||||
const CommuteAppointment(this.trip, this.direction);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user