implemented RMV public transit module including trip search, station departures, and nearby stop lookup, added "Marianum Connect" API integration with bearer token authentication and auto-refresh logic, integrated geolocator for location-based station search, added persistent storage for favorite stations and recent trip queries, and implemented comprehensive UI for journey details, trip results, and disruption alerts
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
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<StopLocation> favoriteStations;
|
||||
List<StopLocation> recentStations;
|
||||
List<RecentTripQuery> recentTripQueries;
|
||||
|
||||
static const int maxRecents = 10;
|
||||
|
||||
RmvSettings({
|
||||
this.favoriteStations = const [],
|
||||
this.recentStations = const [],
|
||||
this.recentTripQueries = const [],
|
||||
});
|
||||
|
||||
factory RmvSettings.fromJson(Map<String, dynamic> json) =>
|
||||
_$RmvSettingsFromJson(json);
|
||||
Map<String, dynamic> 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<String, dynamic> json) =>
|
||||
_$RecentTripQueryFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$RecentTripQueryToJson(this);
|
||||
}
|
||||
Reference in New Issue
Block a user