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,23 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import '../../connect_api.dart';
|
||||
import '../rmv_models.dart';
|
||||
import '_query_format.dart';
|
||||
|
||||
class GetJourneyDetail extends ConnectApi<JourneyDetail> {
|
||||
final String journeyRef;
|
||||
final DateTime? date;
|
||||
|
||||
GetJourneyDetail({required this.journeyRef, this.date})
|
||||
: super('rmv/journey');
|
||||
|
||||
@override
|
||||
Map<String, String>? get queryParameters => {
|
||||
'ref': journeyRef,
|
||||
if (date != null) 'date': formatLocalDate(date!),
|
||||
};
|
||||
|
||||
@override
|
||||
JourneyDetail assemble(String raw) =>
|
||||
JourneyDetail.fromJson(jsonDecode(raw) as Map<String, dynamic>);
|
||||
}
|
||||
Reference in New Issue
Block a user