import 'package:json_annotation/json_annotation.dart'; import '../api/connect/rmv/rmv_models.dart'; part 'rmv_settings.g.dart'; @JsonSerializable(explicitToJson: true) class RmvSettings { List favoriteStations; List recentStations; List recentTripQueries; static const int maxRecents = 10; RmvSettings({ this.favoriteStations = const [], this.recentStations = const [], this.recentTripQueries = const [], }); factory RmvSettings.fromJson(Map json) => _$RmvSettingsFromJson(json); Map toJson() => _$RmvSettingsToJson(this); } @JsonSerializable(explicitToJson: true) class RecentTripQuery { final StopLocation from; final StopLocation to; final int timestampMs; RecentTripQuery({ required this.from, required this.to, required this.timestampMs, }); factory RecentTripQuery.fromJson(Map json) => _$RecentTripQueryFromJson(json); Map toJson() => _$RecentTripQueryToJson(this); }