import 'package:json_annotation/json_annotation.dart'; import '../api/connect/rmv/rmv_models.dart'; import '../view/pages/timetable/data/timetable_name_mode.dart'; part 'timetable_settings.g.dart'; @JsonSerializable(explicitToJson: true) class TimetableSettings { bool connectDoubleLessons; TimetableNameMode timetableNameMode; /// Show RMV transit cards before the first lesson and after the last lesson /// of each day. bool showCommuteInTimetable; /// The user's home RMV stop. Resolved via Nominatim → nearbyStops in the /// settings flow; once stored it is used directly for all trip lookups. StopLocation? homeStation; /// Free-text label of the address the user entered (for display purposes /// only — the actual lookup uses [homeStation]). String? homeAddressLabel; /// School-side stop. Default-resolved via `searchStops("Fulda Marianum")` /// on the first activation of [showCommuteInTimetable]. StopLocation? schoolStation; /// Minutes added as a walking buffer between the stop and the first lesson /// (and analogously after the last lesson). int commuteBufferMinutes; TimetableSettings({ required this.connectDoubleLessons, required this.timetableNameMode, this.showCommuteInTimetable = false, this.homeStation, this.homeAddressLabel, this.schoolStation, this.commuteBufferMinutes = 5, }); factory TimetableSettings.fromJson(Map json) => _$TimetableSettingsFromJson(json); Map toJson() => _$TimetableSettingsToJson(this); }